Long-term scheduling

Here we present the long-term scheduling module. The long-term scheduling module of spock has been concived to optimizing the planifification of targets on the SPECULOOS telescopes (SSO, SNO, Saint-Ex, TS, TN) and follow the strategy decided by the consortium.

Note: Before you insert new observations and upload them please make sure you have informed the SPECULOOS consortium

Make schedules

To create the night_blocks for a date range. The only information needed are:

  • the name of the site, ex: obs_name = 'SSO'

  • the name of the telescope (because there can be several telescope per site), ex: telescope ='Io'

  • date range as a list, ex: date_range = ['2021-08-01 15:00:00','2021-08-02 15:00:00']

Then you only have to run the following lines of code:

[2]:
import SPOCK.long_term_scheduler as SPOCKLT
from astropy.time import Time

schedule = SPOCKLT.Schedules()
schedule.observatory_name = 'SSO'
schedule.telescope = 'Io'
schedule.load_parameters(date_range=['2021-08-01 15:00:00','2021-08-02 15:00:00'])


schedule.make_schedule(Altitude_constraint = 28, Moon_constraint = 30)

WARNING:  No plans in your local file for  Europa on the 2021-08-01
WARNING:  No plans in your local file for  Ganymede on the 2021-08-01
WARNING:  No plans in your local file for  Callisto on the 2021-08-01
WARNING:  No plans in your local file for  Artemis on the 2021-08-01
WARNING:  No plans in your local file for  Saint-Ex on the 2021-08-01
WARNING:  No plans in your local file for  TS_La_Silla on the 2021-08-01
WARNING:  No plans in your local file for  TN_Oukaimeden on the 2021-08-01

INFO:  day is :  2021-08-01 15:00:00.000
INFO:  Not using moon phase in ETC
WARNING:  Change filter to avoid saturation!!
WARNING:  Change filter to avoid saturation!!
INFO:  Not using moon phase in ETC
INFO:  First target is 'set'


INFO:  no transition block

[3]:
display(schedule.night_block_by_day[0])
Table length=2
targetstart time (UTC)end time (UTC)duration (minutes)ra (h)ra (m)ra (s)dec (d)dec (m)dec (s)configuration
str15str23str23float64str32str32str32str32str32str32object
Sp1845-63572021-08-01 22:56:20.0172021-08-02 04:44:00.017347.6666666666667418.045.08.664480000022934-63.0-57.0-47.46239999999375{'filt': 'i', 'texp': '20'}
Sp2331-27492021-08-02 04:44:20.0172021-08-02 10:40:00.017355.6666666666666323.031.021.752880000023254-27.0-49.0-49.60559999999447{'filt': 'I+z', 'texp': '28'}

Save schedules

To save the schedules that just has been created you just need to use the function save_schedule. You’ll just need to specify the name of the telescope and the data range for which you would like to save the schedule.

[5]:
SPOCKLT.save_schedule(save=True, over_write=True,
                      date_range=schedule.date_range, telescope=schedule.telescope)
INFO:  "/Users/elsaducrot/spock_2/night_blocks_propositions/night_blocks_Io_2021-08-01.txt" has been copied to "/Users/elsaducrot/spock_2/DATABASE/Io/Archive_night_blocks/"

Make ACP plans

[6]:
SPOCKLT.make_plans(day=schedule.date_range[0], nb_days=schedule.date_range_in_days,
                   telescope=schedule.telescope)

INFO:  Path exists and is:  /Users/elsaducrot/spock_2/DATABASE/Io/night_blocks_Io_2021-08-01.txt
WARNING:  not possible at that time because of altitude constraint, adding 20 degrees altitude

Upload plans on telescope’s control computer + Cambridge archive

[7]:
SPOCKLT.upload_plans(day=schedule.date_range[0], nb_days=schedule.date_range_in_days,
                     telescope=schedule.telescope)
-----> 2021-08-01 Plans uploaded on the Cambridge server
-----> 2021-08-01 Night plans uploaded on the Cambridge server
-----> 2021-08-01 Zip Plans_by_dates folder uploaded on the Cambridge server
-----> 2021-08-01 Zip Plans_by_dates folder uploaded on the HUB for Io
[ ]: