47 | | '''Updated 13 Dec 2015''' |
48 | | |
49 | | Do the following to update the current NMSL scripts at any time. |
50 | | |
51 | | - login to mayall-idl as mzls |
52 | | - cd products/mosaic3 |
53 | | - mkdir 2015dec13 |
54 | | - python py/mosaic3strategy.py -t obstatus/mosaic-tiles_obstatus.fits -d 2015-12-13 -p 1 -pass 1 --moon-sep-limit 50 --start-date 2015-12-14 --start-time 02:00:00 --end-time 13:00:00-seez 1.15 -sbz 18.45 --dir 2015dec13 |
55 | | |
56 | | Rename the script, so we don't overwrite it later: |
57 | | |
58 | | mv mosaic_2015-12-13_plan.json mosaic_2015-12-13_plan1.json |
59 | | mv strategy_2015-12-13.txt strategy_2015-12-13_plan1.txt |
60 | | |
61 | | The mosaicstrategy script outputs a JSON file (e.g., mosaic_2015_12-13_plan.json in the above example). In order to produce the execution script for NOCS, run Behzad Abareshi's script: |
62 | | |
63 | | python ./py/jnox.py --in mosaic_2015-12-13_plan1.json --out mzls_2015-12-13_plan1.sh |
64 | | |
65 | | Then copy this output (e.g., mzls_2015-12-13_plan1.sh) to the exec directory of the observer account on the mosaic3 computer (observer@mosaic3:/home/observer/exe) |
66 | | which is cross-mounted as follows: |
67 | | |
68 | | cp mzls_2015-12-13_plan1.sh /mosaic3/exec |
69 | | |
70 | | Start uptiles running in an IDL window on mayall-idl; this will always use the most up-to-date version of the mosaic-tiles_obstatus.fits file. Once this finishes running (usually a couple of minutes), in a nocs terminal window on mosaic3, cd to exec and execute the script: |
71 | | |
72 | | ~/exec> ./mzls_2015-12-13_plan1.sh |
73 | | |
74 | | = Instructions and details for mosaicstrategy.py = |
75 | | '''written by A. Patej''' |
76 | | |
77 | | mosaicstrategy.py is a Python script that can generate a nightly observing plan. It requires several Python modules: |
78 | | - numpy |
79 | | - pylab (Matplotlib) |
80 | | - ephem (Pyephem) |
81 | | - pyfits |
82 | | |
83 | | The code is adopted from the DecamLegacy project. See those [wiki:DecamLegacy/NotesforObservers wiki pages] for more information. |
84 | | |
85 | | === Selection of Pass 1, 2, or 3 === |
86 | | |
87 | | It is '''very important''' to adhere to the strategy of when to observe pass 1, 2, or 3 tiles, |
88 | | in particular that pass 1 tiles are always in photometric good-seeing conditions. |
89 | | The overall strategy is outlined at [[wiki:MayallZbandLegacy/ObservingStrategy]]]. |
90 | | |
91 | | The strategy is as follows: |
92 | | * **Pass 1:** Photometric and seeing < 1.3 arc sec |
93 | | * **Pass 2:** Photometric or seeing < 1.3 arc sec, or all Pass 1 tiles completed |
94 | | * **Pass 3:** Unphotometric and seeing > 1.3 arc sec, or all Pass 1 and Pass 2 tiles completed |
95 | | These need not be observed in any particular order, e.g. pass 3 observations can certainly |
96 | | occur before pass 1. |
97 | | |
98 | | If conditions change, then you should definitely change to a different pass. |
99 | | For example, if clouds begin to roll in, you should stop any pass 1 observations right away! |
100 | | |
101 | | === Running the script === |
102 | | |
103 | | At a minimum, the mosaicstrategy.py script can be run with these inputs: |
104 | | |
105 | | -t *name of file with tile centers* [[BR]] |
106 | | -d *UT date at ''start'' of night in format yyyy-mm-dd* [[BR]] |
107 | | -p *portion of night (1.0, 0.5 (first half), -0.5 (second half))* [[BR]] |
108 | | -pass *desired pass - input 1, 2, or 3* [[BR]] |
109 | | --dir *name of the dir where the output scripts are located* [[BR]] |
110 | | For instance, to generate a pass 3 plan for the entire night of April 26, 2015, run: |
111 | | {{{ |
112 | | python ./nightlystrategy.py -t moasic-tiles_obstatus.fits -d 2015-04-26 -p 1.0 -pass 3 --dir obsScripts |
113 | | python ./py/jnox.py --in mosaic_2015-04-26_plan.json --out mzls_2015-04-26_plan.sh |
114 | | }}} |
115 | | |
116 | | Additional optional arguments: |
117 | | 1. Observing conditions: [[BR]] |
118 | | -sb(f) *sky brightness in filter f; replace (f) = g, r, or z* in mag/sqarcsec [[BR]] |
119 | | -see(f) *seeing in filter f; replace (f) = g, r, or z* in arcsec [[BR]] |
120 | | -transparency *value of the transparency* (0-1.0) [[BR]] |
121 | | |
122 | | 2. Observing constraints: [[BR]] |
123 | | --airmass-limit *maximum allowed airmass, default is 2.3* [[BR]] |
124 | | --moon-sep-limit *minimum allowed moon separation, default is 50.0 deg* [[BR]] |
125 | | --moon-alt-limit *moon altitude in deg required for switching between z and g,r* [[BR]] |
126 | | --min-dec *Declination minimum limit for choosing tiles [[BR]] |
127 | | --max-dec *Declination maximum limit for choosing tiles [[BR]] |
128 | | |
129 | | 3. Custom Scheduling: [[BR]] |
130 | | It's possible to create a plan for a specific block of time. To do so, use the following options:[[BR]] |
131 | | --start-date *Date of start of observations (UTC) in format yyyy-mm-dd; overrides the default start of night, which is calculated using --date and --portion. Requires --start-time to also be set* [[BR]] |
132 | | --start-time *Time of start of observations (UTC) in format hh:mm:ss; overrides the default start of night, which is calculated using --date and --portion. Requires --start-date to also be set*[[BR]] |
133 | | --end-date *Date of end of observations (UTC) in format yyyy-mm-dd; overrides the default end of night, which is calculated using --date and --portion. Requires --end-time to also be set*[[BR]] |
134 | | --end-time *Time of end of observations (UTC) in format hh:mm:ss; overrides the default end of night, which is calculated using --date and --portion. Requires --end-date to also be set*[[BR]] |
135 | | |
136 | | |
137 | | More complicated example using these options: [[BR]] |
138 | | Assuming 18.2 as z-band sky brightness, 1.2" seeing in z and 1.0" seeing in r, photometric conditions (pass 1) and allowing a moon separation of 50 deg and including DESI tiles: |
139 | | {{{ |
140 | | python ./mosaicstrategy.py -t mosaic-tiles_obstatus.fits -d 2015-04-26 -p 1.0 -pass 1 -sbz 18.2 -seer 1.0 -seez 1.2 --moon-sep-limit 50.0 --expand [[BR]] |
141 | | python ./py/jnox.py --in mosaic_2015-04-26_plan.json --out mzls_2015-04-26_plan.sh |
142 | | }}} |
143 | | |
144 | | Example using custom scheduling: [[BR]] |
145 | | To generate a plan for just two hours on the night that starts on 2015-04-26 between 05:00 and 07:00 UTC, and restricting the DEC range: |
146 | | {{{ |
147 | | python ./mosaicstrategy.py -t mosaic-tiles_obstatus.fits -d 2015-04-26 -p 1.0 -pass 1 --start-date 2015-04-27 --start-time 05:00:00 --end-date 2015-04-27 --end-time 07:00:00 --min-dec=34 --max-dec=50 --moon-sep-limit 50.0 [[BR]] |
148 | | python ./py/jnox.py --in mosaic_2015-04-26_plan.json --out mzls_2015-04-26_plan.sh |
149 | | |
150 | | }}} |
151 | | |
152 | | === Outputs === |
153 | | |
154 | | This script will output many data files to your current directory: |
155 | | |
156 | | 1. a single text file called "strategy_mm-dd.txt", with information about all the pointings for the night (exp time, filter, approximately when they should be run, airmass, etc). There is a corresponding plot of what has been observed previously (by pass) and what you will be observing given the plan for the night: saved as a pdf, 'plot_plan_yyy-mm-dd.pdf' (gray = z, red = r, green = g). Planets and moon are plotted as well. |
157 | | |
158 | | 2. many executable script files of the form "Mosaic_Survey<tile id>.sh" for the night corresponding to the plan. There is one script file for each pointing in the plan. A single meta-script is produced that will call those ".sh" files: moasic_<ut date>_plan.sh. |
159 | | |
160 | | 3. A FITS file called "mosaic-tiles_obstatus_update_yyyy-mm-dd.fits" that is a temporary updated mosaic obstatus file that assumes all planned observations were completed. This should not be used during the run; instead use the updated tiles file obtained from running the idl program, uptiles (see section on "Creating the Updated Observing Status File" below). |
161 | | |
162 | | = Updating the "observed tiles" file = |
163 | | |
164 | | The FITS file listing which tiles have been completed should be updated throughout the night. |
165 | | This file is '''$MOS3_OBS/obstatus/mosaic-tiles_obstatus.fits'''. The following IDL command |
166 | | will monitor exposures as they are taken throughout the night, automatically updating this file: |
167 | | {{{ |
168 | | IDL> muptiles |
169 | | }}} |
170 | | |
171 | | At the end of the night, you should check the updated tile file into the svn repository: |
172 | | {{{ |
173 | | cd $MOS3_OBS/obstatus |
174 | | svn commit obstatus/mosaic-tiles_obstatus.fits --username <YOUR-NAME> |
175 | | }}} |
176 | | |
177 | | = Checking the Sky Brightness, Seeing and Transparency = |
178 | | |
179 | | The observing strategy files take as input these environmental conditions for |
180 | | setting the exposure times to achieve the required MzLS survey depth. |
181 | | |
182 | | From an IDL prompt, use the MOSSTAT routine to analyze the latest image on disk: |
183 | | {{{ |
184 | | IDL> mosstat |
185 | | }}} |
186 | | There are keyword options that allow you to choose different exposure numbers or CCDs |
187 | | within that exposure. For example, to analyze chip 'im16' of the exposure number 12345, type: |
188 | | {{{ |
189 | | IDL> mosstat, 12345, ext='im16' |
190 | | }}} |
191 | | The full documentation can be seen with: |
192 | | {{{ |
193 | | IDL> doc_library,'mosstat' |
194 | | }}} |
195 | | |
196 | | If the telescope pointing has gone off by more than about 30 arcsec (which happens!), then |
197 | | this routine will likely fail to match stars. If this happens, the operator will need to recenter the telescope. |
198 | | |
199 | | One can also check the observing progress using the almanac command: |
200 | | IDL> almanac, 10001, /noprint |
201 | | will print out a summary of all the frames from 10001 to the present in a nice tabular form (widen the window). This is useful for checking how the seeing and sky brightness have varied since frame 10001, and whether one should create and upload a new JSON observing script. The /noprint just prevents the decstat output for every frame; if you want to see that, then don't use the /noprint keyword. |