sherlockpipe.observation_plan.planner.Planner

class sherlockpipe.observation_plan.planner.Planner

Bases: object

Class containing the main method to generate the observation plan events.

__init__()

Methods

__init__()

create_observation_observables(object_id, ...)

Computes the observation windows for the given target parameters.

get_offset(lat, lng, datetime)

Returns a location's time zone offset from UTC in minutes.

get_twin(ax)

Retrieves a twin Y axis for a given matplotlib axis.

plan_event(planner_input)

Compute the observability of a single transit event.

static create_observation_observables(object_id, object_dir, ra, dec, since, name, epoch, epoch_low_err, epoch_up_err, period, period_low_err, period_up_err, duration, observatories_file, timezone, latitude, longitude, altitude, max_days, min_altitude, moon_min_dist, moon_max_dist, transit_fraction, baseline, error_alert=True, time_unit='jd', cpus=1)

Computes the observation windows for the given target parameters.

Parameters:
  • object_id – the candidate id

  • object_dir – the candidate directory

  • ra – right ascension of the target

  • dec – declination of the target

  • since – starting plan date

  • name – the name given to the candidate

  • epoch – the candidate epoch

  • epoch_low_err – the candidate epoch’s lower error

  • epoch_up_err – the candidate epoch’s upper error

  • period – the candidate period

  • period_low_err – the candidate period’s lower error

  • period_up_err – the candidate period’s upper error

  • duration – the candidate duration

  • observatories_file – the file containing the observatories file (csv format)

  • timezone – the timezone of the observatory (if observatories_file=None)

  • latitude – the latitude of the observatory (if observatories_file=None)

  • longitude – the longitude of the observatory (if observatories_file=None)

  • altitude – the altitude of the observatory (if observatories_file=None)

  • max_days – the maximum number of days to compute the observables

  • min_altitude – the minimum altitude of the target above the horizon

  • moon_min_dist – the minimum moon distance for moon illumination = 0

  • moon_max_dist – the minimum moon distance for moon illumination = 1

  • transit_fraction – the minimum transit observability (0.25 for at least ingress/egress, 0.5 for ingress/egress + midtime, 1 for ingress, egress and midtime).

  • baseline – the required baseline in hours.

  • error_alert – whether to create the alert date to signal imprecise observations

  • time_unit – the unit of the light curve data

Returns:

the generated data and target folders observatories_df, observables_df, alert_date, plan_dir, images_dir

Returns:

observatories_df containing the observatories used for the computation

Returns:

observables_df containing all the observation windows that passed the plan

Returns:

alert_date in case the plan reached a date where the observation uncertainty was too high

Returns:

images_dir the directory where images are stored

static get_offset(lat, lng, datetime)

Returns a location’s time zone offset from UTC in minutes.

Parameters:
  • lat – geographical latitude

  • lng – geographical longitude

  • datetime – the UTC time

static get_twin(ax)

Retrieves a twin Y axis for a given matplotlib axis. This is useful when we have two axes one placed at each side of the plot.

Parameters:

ax – the known matplotlib axis.

Returns:

the twin axis.

static plan_event(planner_input: PlannerInput)

Compute the observability of a single transit event.

Evaluates whether a transit event is observable given the constraints, generates an airmass plot, and returns the observability data.

Parameters

planner_inputPlannerInput

The input data for the observation event.

Returns

tuple

A tuple of (alert_date, observable_dict) where alert_date is a Time object if the event uncertainty is too large (or None), and observable_dict contains the observation details (or None if not observable).