procastro.obsrv package

Subpackages

Submodules

procastro.obsrv.nightly module

class procastro.obsrv.nightly.Nightly(observatory='lasilla', altitude_min=25, night_angle=-12, moon_separation_min=10, vmag_min=10, vmag_max=15, transit_percent_min=0.999, baseline_min=0.2, baseline_max=1, baseline_both=True, default_duration=2, force_reload=False, reload_days=7)

Bases: object

Methods

plot(date[, precision, extend, ...])

Plots the altitudes of the encountered exoplanet's stars for the given date with information about the observation

apply_filters_needed

constraints

observatory

set_date

apply_filters_needed()
constraints(altitude_min=None, night_angle=None, moon_separation_min=None, vmag_min=None, vmag_max=None, transit_percent_min=None, baseline_min=None, baseline_max=None, baseline_both=None, default_duration=None)
observatory(observatory)
plot(date, precision: int = 150, extend: bool = True, altitude_separation: float = 60, ax: Axes | Figure | int | None = None, mark_ra: Tuple[float, float] | None = None, colorbar: bool = False)

Plots the altitudes of the encountered exoplanet’s stars for the given date with information about the observation

Parameters:
  • date (str) – Date for which to plot

  • colorbar

  • mark_ra ((float, float)) – RA region to mark in output plot

  • ax (matplotlib.Axes, matplotlib.Figure, int) – axes where plot will be produced

  • precision (int) – the number of altitudes points to plot between the start and the end of the stars’ observation

  • extend (bool , optional) – if True is given , then the plot will have only the transit’s interval of the observation. If not, then the plot will have the complete observations.

  • altitude_separation (float) – separation in degrees between vertical altitude curves

Return type:

object

set_date(date, n_points=1400, equinox_db='J2000')
procastro.obsrv.nightly.query_full_exoplanet_db(force_reload: bool = False, reload_days: float = 7)

procastro.obsrv.obscalc module

class procastro.obsrv.obscalc.ObsCalc(timespan=2017, target=None, site='paranal', equinox='J2000', **kwargs)

Bases: object

Object used to compute exoplanet transits

Parameters:
  • timespan (int, optional) –

  • target (str, optional) –

  • site (string, optional) –

  • equinox (string, optional) –

  • central_time (int, optional) – Central time of y-axis. If outside the [-12,24] range, then only shows nighttime

_obs
Type:

ephem.Observer instance

_sun
Type:

ephem.Sun instance

params

General parameter values. Available keys: ‘target’, ‘current transit’, ‘equinox’, ‘lat_lon’, ‘site’, ‘to_local_midday’, ‘timespan’

Type:

dict

daily

Sunset, sunrise and twilight information

Type:

dict

jd0

Initial transit timespan value in JD

Type:

float

star

Host star

Type:

SkyCoord instance

transit_info

Data relevant to the current transit being observed Current keys include: length, epoch, period and offset

Type:

dict

airmass
Type:

array_like

transits

Available transits for the current target

Type:

array_like

transit_hours

Hours in which the exoplanet transit is detectable

Type:

array_like

days

Days in which the current transit is visible

Type:

array_like

hours
Type:

array_like

xlims, ylims

Dimensions of grid used to create the main figures

Type:

array_like

Methods

set_site(site)

Define name from list aailable from EarthLocation

set_transits([tr_period, tr_epoch])

Calculate the transits.

set_target

set_timespan

set_vertical

set_site(site)

Define name from list aailable from EarthLocation

Parameters:

site (string ,optional) – Identifies the observatory as a name, or (lat, lon) tuple,

set_target(*args, **kwargs)
set_timespan(*args, **kwargs)
set_transits(tr_period=None, tr_epoch=None, **kwargs)

Calculate the transits. It assumes that the decorator has already checked transit_info existence

Parameters:
  • tr_period (float, optional) – Transit period

  • tr_epoch (float, optional) – Transit epoch

set_vertical(*args, **kwargs)

procastro.obsrv.obsrv module

class procastro.obsrv.obsrv.Obsrv(target=None, show_twilight=True, show_months=True, show_colorbar=True, show_transits=True, interact=True, savedir='fig/', altitude_limit=30, **kwargs)

Bases: ObsCalc

Class used to schedule day/hour of an exoplanet transit

During initialization this object will generate two images which can be interacted with.

Right Image:

Displays an exoplanet eclipsing transits across a specific timeframe, where the x-axis shows the day of occurrence while the y-axis corresponds to the hour of the event.

Each transit is shown as a white dot which can be clicked to display a plot image specific to that transit located to the left.

Yellow lines are used to delimit months, the background color is used to plot the expected airmass on that date and the grey bands shown above and below represent the sun and twilight set and rise.

Left Image:

Elevation vs time graph, showing the elevation of the transit in blue vs the moon distance in yellow.

On each click, the object will print the datetime of the transit in standard format and JD format.

Setters are used to change the parameters of the current Obsrv instance while the interactive plot is active. Closing the plot and setting data afterwards will cause unexpected behaviour.

Parameters:
  • target (string, optional) – Object to be observed

  • show_twilight (bool, optional) –

  • show_months (bool, optional) –

  • show_colorbar (bool, optional) –

  • show_transits (bool, optional) –

  • interact (bool, optional) –

  • savedir (str, optional) – Directory where the plotted figures will be stored

  • altitude_limit (int, optional) –

  • central_time (int, optional) – Central time of the y-axis. If outside the [-12,24] range then only shows nighttime.

params

Store each parameter current values

Type:

dict

cid

Stores interactive mode pyplot variables and methods

Type:

list

airmass
Type:

array_like

xlims, ylims
Type:

array_like

See also

procastro.obsrv.ObsCalc

Parent class which computes transit data

Methods

get_closer_transit(cd, ch)

Obtains the closest transit of the target from the given day and hour

set_site(site)

Define name from list aailable from EarthLocation

plot_values

set_target

set_timespan

set_transits

set_vertical

get_closer_transit(cd, ch)

Obtains the closest transit of the target from the given day and hour

Parameters:
  • cd (float (JD format)) – Current day and hour

  • ch (float (JD format)) – Current day and hour

Return type:

array_like

plot_values(x, y, idx, rel_pos=1.0, abs_pos=None, color='black', marker=None)
set_target(*args, **kwargs)
set_transits(*args, **kwargs)

Calculate the transits. It assumes that the decorator has already checked transit_info existence

Parameters:
  • tr_period (float, optional) – Transit period

  • tr_epoch (float, optional) – Transit epoch

set_vertical(*args, **kwargs)

Module contents

class procastro.obsrv.Nightly(observatory='lasilla', altitude_min=25, night_angle=-12, moon_separation_min=10, vmag_min=10, vmag_max=15, transit_percent_min=0.999, baseline_min=0.2, baseline_max=1, baseline_both=True, default_duration=2, force_reload=False, reload_days=7)

Bases: object

Methods

plot(date[, precision, extend, ...])

Plots the altitudes of the encountered exoplanet's stars for the given date with information about the observation

apply_filters_needed

constraints

observatory

set_date

apply_filters_needed()
constraints(altitude_min=None, night_angle=None, moon_separation_min=None, vmag_min=None, vmag_max=None, transit_percent_min=None, baseline_min=None, baseline_max=None, baseline_both=None, default_duration=None)
observatory(observatory)
plot(date, precision: int = 150, extend: bool = True, altitude_separation: float = 60, ax: Axes | Figure | int | None = None, mark_ra: Tuple[float, float] | None = None, colorbar: bool = False)

Plots the altitudes of the encountered exoplanet’s stars for the given date with information about the observation

Parameters:
  • date (str) – Date for which to plot

  • colorbar

  • mark_ra ((float, float)) – RA region to mark in output plot

  • ax (matplotlib.Axes, matplotlib.Figure, int) – axes where plot will be produced

  • precision (int) – the number of altitudes points to plot between the start and the end of the stars’ observation

  • extend (bool , optional) – if True is given , then the plot will have only the transit’s interval of the observation. If not, then the plot will have the complete observations.

  • altitude_separation (float) – separation in degrees between vertical altitude curves

Return type:

object

set_date(date, n_points=1400, equinox_db='J2000')
class procastro.obsrv.Obsrv(target=None, show_twilight=True, show_months=True, show_colorbar=True, show_transits=True, interact=True, savedir='fig/', altitude_limit=30, **kwargs)

Bases: ObsCalc

Class used to schedule day/hour of an exoplanet transit

During initialization this object will generate two images which can be interacted with.

Right Image:

Displays an exoplanet eclipsing transits across a specific timeframe, where the x-axis shows the day of occurrence while the y-axis corresponds to the hour of the event.

Each transit is shown as a white dot which can be clicked to display a plot image specific to that transit located to the left.

Yellow lines are used to delimit months, the background color is used to plot the expected airmass on that date and the grey bands shown above and below represent the sun and twilight set and rise.

Left Image:

Elevation vs time graph, showing the elevation of the transit in blue vs the moon distance in yellow.

On each click, the object will print the datetime of the transit in standard format and JD format.

Setters are used to change the parameters of the current Obsrv instance while the interactive plot is active. Closing the plot and setting data afterwards will cause unexpected behaviour.

Parameters:
  • target (string, optional) – Object to be observed

  • show_twilight (bool, optional) –

  • show_months (bool, optional) –

  • show_colorbar (bool, optional) –

  • show_transits (bool, optional) –

  • interact (bool, optional) –

  • savedir (str, optional) – Directory where the plotted figures will be stored

  • altitude_limit (int, optional) –

  • central_time (int, optional) – Central time of the y-axis. If outside the [-12,24] range then only shows nighttime.

params

Store each parameter current values

Type:

dict

cid

Stores interactive mode pyplot variables and methods

Type:

list

airmass
Type:

array_like

xlims, ylims
Type:

array_like

See also

procastro.obsrv.ObsCalc

Parent class which computes transit data

Methods

get_closer_transit(cd, ch)

Obtains the closest transit of the target from the given day and hour

set_site(site)

Define name from list aailable from EarthLocation

plot_values

set_target

set_timespan

set_transits

set_vertical

get_closer_transit(cd, ch)

Obtains the closest transit of the target from the given day and hour

Parameters:
  • cd (float (JD format)) – Current day and hour

  • ch (float (JD format)) – Current day and hour

Return type:

array_like

plot_values(x, y, idx, rel_pos=1.0, abs_pos=None, color='black', marker=None)
set_target(*args, **kwargs)
set_transits(*args, **kwargs)

Calculate the transits. It assumes that the decorator has already checked transit_info existence

Parameters:
  • tr_period (float, optional) – Transit period

  • tr_epoch (float, optional) – Transit epoch

set_vertical(*args, **kwargs)
procastro.obsrv.query_full_exoplanet_db(force_reload: bool = False, reload_days: float = 7)