API

Nutpy main class is called Nut. This class contains the main methods to study the visibility between a rotating space telescope and an ancillary satellite nearby.

class nutpy.mission.Nut(**kwargs)

Interface with the user

name

Name of the mission

Type

str

mission_time

Period of time considered for the numerical analysis

Type

float

dT

Step time used for the numerical analysis

Type

float

sensor_id

Sensor id number

Type

int

SSP

Scan strategy parameters [alpha (deg), beta (deg), spin period (min), precesion period (min), delta (deg)]

Type

list (5) of floats

delta_detector

Half-angle of the detector fov (degrees)

Type

float

Nx

Number of horizontal detectors (rectangular array)

Type

int

Ny

Number of vertical detectors (rectangular array)

Type

int

layout

Type of array layout (circular/rectangular/custome)

Type

str

Nd

Number of detectors of the circular array

Type

int

file_name

File with detectors positions

Type

str

analytical_map(quantity='TAT', precession='trace', sensor_id=None, fig_flag=True)

Calculates analytically the demanded quantity for all the celestial sphere and plots it.

Parameters
  • SSP (list (5)) – Scan Law Parameters (alpha, beta, spin, precesion, delta)/ (deg, deg, min, min, deg)

  • N (int) – Resolution of results

  • tf (float) – Total time considered

  • quantity (str) – Quantity to be computed

  • fig_flag (bool) – If True, figure is returned

  • precession (str) – Method to be used to account for precession

  • units (str) – Time units for the output

  • cbar_size (float) – Size of the colorbar

Returns

  • fig (matplotlib figure) – Figure of profile

  • data (ndarray (N)) – Results of calculations (value per pixel for Healpix scheme)

analytical_profile(quantity='TAT', precession='trace', sensor_id=None, fig_flag=True)

Calculates analytically the demanded quantity from the temporal analysis for the instrument as a function of the angle regarding the precession axis

Parameters
  • N (int) – Resolution of results

  • tf (float) – Total time considered

  • quantity (str) – Quantity to be computed

  • fig_flag (bool) – If True, figure is returned

  • precession (str) – Method to be used to account for precession

Returns

  • fig (matplotlib figure) – Figure of profile

  • T (ndarray (N)) – Results of calculations (profile)

check_attitude()

Checks if the generated attitude corresponds to the mission parameters

check_coherence_criteria()

Checks the coherence criteria is fullfilled

check_coherence_criteria_detectors()

Checks the coherence criteria for the detectors is fullfilled

check_memory_usage()

Checks if memory usage is too high

check_numerical_analysis()

Checks if the numerical analysis has been performed

generate_attitude()

Emulates satellite attitude motion

numerical_analysis()

Performs numerical analysis.

Computes which sensors are viewed and for how long

This analysis produces two sets of data: sensors_results_global_df and sensors_results_detailed_dict. The former stores the Figures of Merit (FOM) of computed for each point in the sky. The second stores the FOM of each detectors for each case point in the sky (requires dense=True)

numerical_map(quantity='TAT', units='s', sensor_id=None, **kwargs)

Plot temporal analysis results

Parameters
  • map_type (str) – Result to be plotted

  • N (int) – Mesh for plotting

Returns

fig – Plotted figure

Return type

matplotlib figure

numerical_profile(quantity='TAT', unit='s', fig_flag=True, sensor_id=None)

Calculates analytically the demanded quantity from the temporal analysis for the instrument as a function of the angle regarding the precession axis

Parameters
  • N (int) – Resolution of results

  • tf (float) – Total time considered

  • quantity (str) – Quantity to be computed

  • fig_flag (bool) – If True, figure is returned

  • precession (str) – Method to be used to account for precession

Returns

  • fig (matplotlib figure) – Figure of profile

  • T (ndarray (N)) – Results of calculations (profile)

plot_focal_plane(cases_dict=None, case_id=None, quantity='Viewed', numbered=False)

Plots focal plane results for a given case (pixel in sky)

Parameters
  • xd (float) – X coordinates of detectors in focal plane

  • yd (float) – Y coordinates of detectors in focal plane

  • nd (int) – Number of detectors

  • r (float) – Half-angle of the detector fov (degrees)

  • cases_dict (dict) – Temporal results for point in the sky

  • case_id (str) – Id of case to be plotted

  • quantity (str) – Quantity to be shown

  • numbered (bool) – If True, sensors Id is plotted

Returns

  • fig (matplotlib figure) – Figure of profile

  • ax (axes) – Matplotlib figure axes of sensor array and FOV

plot_trace()

Plots trace of the instrument over the sky (orthographic projection over the XZ-plane)

Returns

  • fig (matplotlib figure) – Figure of profile

  • ax (axes) – Matplotlib figure axes of sensor array and FOV

visibility_results(quantity, sensor_id)

Retrieves visibility results and completes them

Returns

visibility_global_results_df – Results of visibility analysis

Return type

pandas DataFrame