sherlockpipe.observation_plan.observation_report.ObservationReport

class sherlockpipe.observation_plan.observation_report.ObservationReport(df_observatories, df, alert_date, object_id, name, working_path, ra, dec, t0, t0_low_err, t0_up_err, period, period_low_err, period_up_err, duration, duration_low_err, duration_up_err, depth, depth_low_err, depth_up_err, observable, min_dist, max_dist, min_altitude, max_days, v, j, h, k)

Bases: object

Used to create a pdf file from the parameters and images generated in the plan stage.

__init__(df_observatories, df, alert_date, object_id, name, working_path, ra, dec, t0, t0_low_err, t0_up_err, period, period_low_err, period_up_err, duration, duration_low_err, duration_up_err, depth, depth_low_err, depth_up_err, observable, min_dist, max_dist, min_altitude, max_days, v, j, h, k)

Initialize the observation report.

Parameters

df_observatoriesDataFrame

DataFrame containing observatory information.

dfDataFrame

DataFrame containing the observation events.

alert_datestr or None

The date after which error propagation makes observations unreliable.

object_idstr

The target object identifier.

namestr

The name for the output report file.

working_pathstr

The directory where the report will be saved.

rafloat

Right ascension of the target in degrees.

decfloat

Declination of the target in degrees.

t0float

The transit epoch.

t0_low_errfloat

The lower error of the transit epoch.

t0_up_errfloat

The upper error of the transit epoch.

periodfloat

The orbital period in days.

period_low_errfloat

The lower error of the orbital period.

period_up_errfloat

The upper error of the orbital period.

durationfloat

The transit duration in hours.

duration_low_errfloat

The lower error of the transit duration.

duration_up_errfloat

The upper error of the transit duration.

depthfloat

The transit depth in ppt.

depth_low_errfloat

The lower error of the transit depth.

depth_up_errfloat

The upper error of the transit depth.

observablefloat

The minimum transit observability fraction.

min_distfloat

The minimum moon distance in degrees for new moon.

max_distfloat

The minimum moon distance in degrees for full moon.

min_altitudefloat

The minimum altitude above the horizon in degrees.

max_daysint

The maximum number of days to search for observables.

vfloat

The V-band magnitude of the target.

jfloat

The J-band magnitude of the target.

hfloat

The H-band magnitude of the target.

kfloat

The K-band magnitude of the target.

Methods

__init__(df_observatories, df, alert_date, ...)

Initialize the observation report.

create_footer(canvas, doc)

Initializes the common footer for all the pages

create_header(canvas, doc)

Initializes the common header for all the pages.

create_report()

Creates the final report with all the star parameters, the candidate information and the observation nights data, storing it in a pdf.

df_manipulations()

Performs changes of data from the initial dataframe for better formatting in the report.

row_colors(df, table_object)

Apply alternating row colors to a ReportLab table.

Attributes

ALERT_IMAGE

LOGO_IMAGE

Initializes the common footer for all the pages

Parameters:
  • canvas – the report canvas

  • doc – the report document

create_header(canvas, doc)

Initializes the common header for all the pages.

Parameters:
  • canvas – the report canvas

  • doc – the report document

create_report()

Creates the final report with all the star parameters, the candidate information and the observation nights data, storing it in a pdf.

df_manipulations()

Performs changes of data from the initial dataframe for better formatting in the report.

Returns:

the final dataframe

static row_colors(df, table_object)

Apply alternating row colors to a ReportLab table.

Parameters

dfDataFrame

The dataframe whose rows are used to determine the number of rows.

table_objectTable

The ReportLab Table object to style.