Using spock_chilean with a script¶
The next few lines are meant to show you an example of how to use spock_chilean.
For each target you wish to schedule you will need to provide: * A name * RA (in degrees) * DEC (in gegrees) * the time the observations start * the time the observations end * the filter * the exposure time * the J magnitude (optional) * the spectra type (optional)
Initialisation¶
First open a jupyter Notebook and copy the following cells.
[1]:
import pandas as pd
import SPOCK_chilean
from SPOCK_chilean.make_night_plans import chilean_time
import warnings
warnings.filterwarnings('ignore')
[2]:
telescope = 'Ganymede' # name of telescope allocated
date = '2021-07-07' # start of night date
chilean_nb_target = 2 # number of target to observe this night
counts = 5000 # counts of images per targets (no limit = 5000)
chilean_plans = chilean_time(date, telescope) # Initialize the chilean_time object
Data frame with information on targets¶
[3]:
target_chilean = pd.DataFrame({'Date': date, 'Telescope': telescope, 'Name': 'Ch_WASP-157',
'Start': '2021-07-07 22:30:00.000',
'End': '2021-07-08 03:00:00.000',
'RA': 201.6552906,
'DEC': -8.3175976, 'Filter': 'r\'',
'texp': 10,
'Counts': counts, 'Vmag': 12.9, 'SpT': 'G2'},
index=[0])
if chilean_nb_target > 1:
other_target = {'Date': date, 'Telescope': telescope, 'Name': 'Ch_HATS-24',
'Start': '2021-07-08 03:00:00.000',
'End': '2021-07-08 09:15:00.000',
'RA': 268.8906975,
'DEC': -61.7473242,
'Filter': 'r\'',
'texp': 10,
'Counts': counts, 'Vmag': 12.83, 'SpT': 'F8'}
target_chilean = target_chilean.append(other_target, ignore_index=True, sort=False)
display(target_chilean)
| Date | Telescope | Name | Start | End | RA | DEC | Filter | texp | Counts | Vmag | SpT | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 2021-07-07 | Ganymede | Ch_WASP-157 | 2021-07-07 22:30:00.000 | 2021-07-08 03:00:00.000 | 201.655291 | -8.317598 | r' | 10 | 5000 | 12.90 | G2 |
| 1 | 2021-07-07 | Ganymede | Ch_HATS-24 | 2021-07-08 03:00:00.000 | 2021-07-08 09:15:00.000 | 268.890697 | -61.747324 | r' | 10 | 5000 | 12.83 | F8 |
Make night_blocks¶
[4]:
chilean_plans.make_night_block(target_chilean)
SPOCK_chilean.read_night_block(telescope, date)
INFO: The optimum exposure time for Ch_WASP-157 SpT G2 and V magnitude 12.9 with Filter r' is: 10.214588666607755seconds
For texp:10s, expected peak [ADU]: 44054.63741002936
INFO: the exposure time chosen is ok, no saturation expected.
INFO: The optimum exposure time for Ch_HATS-24 SpT F8 and V magnitude 12.83 with Filter r' is: 9.897065800902036seconds
For texp:10s, expected peak [ADU]: 45468.021437119896
INFO: the exposure time chosen is ok, no saturation expected.
[4]:
Table length=2
| target | start time (UTC) | end time (UTC) | duration (minutes) | ra (h) | ra (m) | ra (s) | dec (d) | dec (m) | dec (s) | configuration |
|---|---|---|---|---|---|---|---|---|---|---|
| str11 | str23 | str23 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | str26 |
| Ch_WASP-157 | 2021-07-07 22:45:48.179 | 2021-07-08 03:00:00.000 | 254.19701658189297 | 13.0 | 26.0 | 37.269744000010405 | -8.0 | -19.0 | -3.35135999999693 | {'filt': "r'", 'texp': 10} |
| Ch_HATS-24 | 2021-07-08 03:00:00.000 | 2021-07-08 09:15:00.000 | 374.9999997764826 | 17.0 | 55.0 | 33.767400000006376 | -61.0 | -44.0 | -50.367120000004775 | {'filt': "r'", 'texp': 10} |
Check night_blocks respect SPECULOOS constraints¶
[5]:
chilean_plans.check_night_blocks()
INFO: OK, filter chosen for Ch_WASP-157 is in the list
INFO: OK, exposure time chosen for Ch_WASP-157 is >10s
INFO: OK, field Ch_WASP-157 respects the elevation constraint
INFO: OK, field Ch_WASP-157 respects the moon constraint
INFO: Ok, field Ch_WASP-157 is scheduled for more than 15 min
INFO: OK, field Ch_WASP-157 does not contain a SPECULOOS target
INFO: Check completed, for Ch_WASP-157, you can send the night_blocks to educrot@uliege.be or to GXG831@student.bham.ac.uk.
INFO: OK, filter chosen for Ch_HATS-24 is in the list
INFO: OK, exposure time chosen for Ch_HATS-24 is >10s
INFO: OK, field Ch_HATS-24 respects the elevation constraint
INFO: OK, field Ch_HATS-24 respects the moon constraint
INFO: Ok, field Ch_HATS-24 is scheduled for more than 15 min
INFO: OK, field Ch_HATS-24 does not contain a SPECULOOS target
INFO: Check completed, for Ch_HATS-24, you can send the night_blocks to educrot@uliege.be or to GXG831@student.bham.ac.uk.
[5]:
True
[ ]: