20 | | 1. On startup, it reads the *pass[123].json* files, drops exposures that should happen before the current time, for each exposure writes two little shell scripts, and also writes a top-level script */mosaic3/exec/mosbot/tonight.sh* |
21 | | 2. It then starts waiting for new images to appear in the $MOS3_DATA directory. Whenever an image appears, it analyzes it and, based on the measured conditions (seeing, sky brightness, transparency), it decides which pass we should be running, and what our exposure times should be, and it overwrites the next few scripts. |
| 20 | - On startup, it reads the `pass[123].json` files, drops exposures |
| 21 | that should happen before the current time, for each exposure writes |
| 22 | two little shell scripts, and also writes a top-level script |
| 23 | `/mosaic3/exec/mosbot/tonight.sh` |
| 24 | - It then starts waiting for new images to appear in the $MOS3_DATA |
| 25 | directory. Whenever an image appears, it analyzes it and, based on |
| 26 | the measured conditions (seeing, sky brightness, transparency), it |
| 27 | decides which pass we should be running, and what our exposure times |
| 28 | should be, and it overwrites the next few scripts. |
| 29 | |
| 30 | |
| 31 | Comments about how this works: |
| 32 | |
| 33 | - mosbot by default starts with PASS 2 observations. And by default, |
| 34 | we set all the exposure times to our minimum exposure time of 80 |
| 35 | seconds. |
| 36 | - THEREFORE, if you kill mosbot after it has written out the |
| 37 | `tonight.sh` script, you will run pass 2 with short exposures all |
| 38 | night long. This is almost certainly not what we want to happen!! |
| 39 | - The `tonight.sh` script is not smart. Each exposure is written to a |
| 40 | script, and the scripts are numbered. If you kill and re-start |
| 41 | `tonight.sh`, you will start from the beginning of the night (or the |
| 42 | last time mosbot was run). If you have to stop the `tonight.sh` |
| 43 | script, PLEASE re-run mosbot to regenerate an appropriate |
| 44 | `tonight.sh` script. |
| 45 | - The `tonight.sh` script writes to a file |
| 46 | `/mosaic3/exec/mosbot/seqnum.txt` to indicate which exposure it is |
| 47 | currently running. The `mosbot.py` script reads that file to figure |
| 48 | out which upcoming exposures it should update. Mosbot by default |
| 49 | writes 1, 2, and 3 exposures ahead of the current sequence number. |