3593
Comment:
|
6760
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
<<TableOfContents(5)>> == Example Plot == {{attachment:plPoiFoc.png|width=70%}} == NEW SQL powered version of the script == The pointFoc.py script now accses the Tapas database directly via a MySQL search. Now all used pointing corrections between two dates, for one project, or one project between two dates can be display with one command. Please refer to the Usage instructions below. On '''mrt-lx3''' the script is available systemwide for all users via: {{{ > pointFoc.py }}} For help see {{{ > pointFoc.py -h }}} If you want to use the script on other machines, please download the up-to-date version as instructed below. Using the script on your machine the command is: {{{ > python pointFoc.py }}} You have to have: matplotlib, numpy, MySQLdb and getpass installed on your machine. '''Important''' Since the script accsesses Tapas directly it is secured with a password, which is the same as for the iramstaff account of the Tapas database. == Usage Instructions == This script creates a plot of the 30m pointing and focus used for observations for: a) all scans between two dates<<BR>> b) one specific project<<BR>> c) one specific project between two dates.<<BR>> Input variables are:<<BR>> -s, --start : reads in Start Date<<BR>> -e, --end : reads in End Date<<BR>> -p, --project : reads in Project Name<<BR>> -o, --output : reads file name to save the Plot<<BR>> -f, --Format : sets the graphic format (eps, png, pdf)<<BR>> -h, --help : print this help<<BR>> The format for dates need to be 'Year-Month-Day', e.g. '2012-01-06'<<BR>> optionally a time can be also given by 'Year-Month-Day Hour:Minute:Second',<<BR>> e.g. '2012-01-06 21:56:45'; with a space in between the Date and the Time.<<BR>> Projects names are the 30m names, e.g. '105-09' or 'monitoring' etc..<<BR>> For a) give only start and end dates<<BR>> for b) only Project Name<<BR>> for c) all three parameters.<<BR>> A plot of all pointings and focus values of the <<BR>> last week is the Default if nothing is specified.<<BR>> The default output file is 'plPoiFoc.eps' in eps format. <<BR>> Via -o and -f name and format can be changed respectively. <<BR>> Possible formats are png, eps, pdf, jpg. <<BR>> Usage Examples: <<BR>> (on mrt-lx3 skip python before the script name)<<BR>> Case a): {{{ > python pointFoc.py -s '2012-01-06' -e '2012-01-16' }}} Case b): {{{ > python pointFoc.py -p '145-11' }}} Case c) {{{ > python pointFoc.py -s '2012-01-06' -e '2012-01-16' -p '145-11' }}} Change plot name/path and format:<<BR>> {{{{ > python pointFoc.py -p '145-11' -o 'newName.png' -f 'png' }}} |
|
Line 6: | Line 102: |
First off all you need the up-to-date version of the python script "plPoiFoc.py" that creates the plot. | First off all you need the up-to-date version of the python script "pointFoc.py" that creates the plot. |
Line 13: | Line 109: |
== In case of Problems == If you get error messages and/or fail to create the plot, please check if you have the latest code. If so you may send me (CB, buchbend AT iram.es) the pointFocus.txt you use and the name of the computer on which you tried to execute the script. Then I can check what is going wrong. = OLD Instructions = |
|
Line 71: | Line 177: |
Finally, to get the information in the format the pyhton script accepts | Finally, to get the information in the format the python script accepts |
Line 91: | Line 197: |
'''Update by AS:''' Now the script can also be used on the '''mrt-aod''' and '''mrt-lx3''' computers. |
|
Line 93: | Line 201: |
in the same directory '''gra-lx18''' you need to execute in a terminal: ''' python plPointFoc.py ''' This will print out the mean pointing and focus corrections on the screen. And create the |
in the same directory you need to execute in a terminal: ''' python pointFoc.py ''' This will print out the mean pointing and focus corrections on the screen and create the |
Line 104: | Line 212: |
to the same '''pointFocus.txt'''. == Future Ideas == We plan to develop a script that directly accesses TAPAS and thus is much easier to handle. So long please stick with this cumbersome way of creating the plot. Once used to it, it does not take more than 5 minutes. |
to the same '''pointFocus.txt'''. Just append the new scans to the bottom of the already existing text file. The script orders the scans in time on its own. Don't worry about empty lines or lines that have not the right format since they are filtered out by the script. |
How To create the Pointing Plot
Contents
Example Plot
NEW SQL powered version of the script
The pointFoc.py script now accses the Tapas database directly via a MySQL search. Now all used pointing corrections between two dates, for one project, or one project between two dates can be display with one command. Please refer to the Usage instructions below.
On mrt-lx3 the script is available systemwide for all users via:
> pointFoc.py
For help see
> pointFoc.py -h
If you want to use the script on other machines, please download the up-to-date version as instructed below. Using the script on your machine the command is:
> python pointFoc.py
You have to have: matplotlib, numpy, MySQLdb and getpass installed on your machine.
Important
Since the script accsesses Tapas directly it is secured with a password, which is the same as for the iramstaff account of the Tapas database.
Usage Instructions
This script creates a plot of the 30m pointing and focus used for observations for:
a) all scans between two dates
b) one specific project
c) one specific project between two dates.
Input variables are:
-s, --start : reads in Start Date
-e, --end : reads in End Date
-p, --project : reads in Project Name
-o, --output : reads file name to save the Plot
-f, --Format : sets the graphic format (eps, png, pdf)
-h, --help : print this help
The format for dates need to be 'Year-Month-Day', e.g. '2012-01-06'
optionally a time can be also given by 'Year-Month-Day Hour:Minute:Second',
e.g. '2012-01-06 21:56:45'; with a space in between the Date and the Time.
Projects names are the 30m names, e.g. '105-09' or 'monitoring' etc..
For a) give only start and end dates
for b) only Project Name
for c) all three parameters.
A plot of all pointings and focus values of the
last week is the Default if nothing is specified.
The default output file is 'plPoiFoc.eps' in eps format.
Via -o and -f name and format can be changed respectively.
Possible formats are png, eps, pdf, jpg.
Usage Examples:
(on mrt-lx3 skip python before the script name)
Case a):
> python pointFoc.py -s '2012-01-06' -e '2012-01-16'
Case b):
> python pointFoc.py -p '145-11'
Case c)
> python pointFoc.py -s '2012-01-06' -e '2012-01-16' -p '145-11'
Change plot name/path and format: