Schedule

class astroplan.Schedule(start_time, end_time, constraints=None)[source]

Bases: object

An object that represents a schedule, consisting of a list of Slot objects.

Parameters:

start_time : Time

The starting time of the schedule; the start of your observing window.

end_time : Time

The ending time of the schedule; the end of your observing window

constraints : sequence of Constraint s

these are constraints that apply to the entire schedule

Attributes Summary

observing_blocks
open_slots
scheduled_blocks

Methods Summary

change_slot_block(slot_index[, new_block]) Change the block associated with a slot.
insert_slot(start_time, block) Insert a slot into schedule and associate a block to the new slot.
new_slots(slot_index, start_time, end_time) Create new slots by splitting a current slot.
to_table([show_transitions, show_unused])

Attributes Documentation

observing_blocks
open_slots
scheduled_blocks

Methods Documentation

change_slot_block(slot_index, new_block=None)[source]

Change the block associated with a slot.

This is currently designed to work for TransitionBlocks in PriorityScheduler The assumption is that the slot afterwards is open and that the start time will remain the same.

If the block is changed to None, the slot is merged with the slot afterwards to make a longer slot.

Parameters:

slot_index : int

The slot to edit

new_block : TransitionBlock, default None

The new transition block to insert in this slot

insert_slot(start_time, block)[source]

Insert a slot into schedule and associate a block to the new slot.

Parameters:

start_time : Time

The start time for the new slot.

block : ObservingBlock

The observing block to insert into new slot.

Returns:

slots : list of Slot objects

The new slots in the schedule.

new_slots(slot_index, start_time, end_time)[source]

Create new slots by splitting a current slot.

Parameters:

slot_index : int

The index of the slot to split

start_time : Time

The start time for the slot to create

end_time : Time

The end time for the slot to create

Returns:

new_slots : list of Slot s

The new slots created

to_table(show_transitions=True, show_unused=False)[source]