Public API

class atlast_sc.calculator.Calculator(user_input={})[source]

Calculator class that provides an interface to the main calculator functionality and performs the core calculations to determine the output sensitivity or integration time.

Parameters:
  • user_input (dict) – Dictionary containing user-defined input parameters

  • instrument_setup (dict) – Dictionary containing instrument setup parameters. NB: usage not tested, and may not be supported in future.

calculate_sensitivity(t_int=None, update_calculator=True)[source]

Calculates the telescope sensitivity (mJy) for a given integration time t_int.

Parameters:
  • t_int (astropy.units.Quantity) – integration time. Optional. Defaults to the internally stored value

  • update_calculator (bool) – True if the calculator should be updated with the specified integration time and calculated sensitivity. Optional. Defaults to True

Returns:

sensitivity in mJy

Return type:

astropy.units.Quantity

calculate_t_integration(sensitivity=None, update_calculator=True)[source]

Calculates the integration time required for a given sensitivity to be reached.

Parameters:
  • sensitivity (astropy.units.Quantity) – required sensitivity. Optional. Defaults to the internally stored value

  • update_calculator (bool) – True if the calculator should be updated with the specified sensitivity and calculated integration time. Optional. Defaults to True

Returns:

integration time in seconds

Return type:

astropy.units.Quantity

property calculated_sensitivity

Calculated sensitivity value

property calculated_t_int

Calculated integration time value

property chosen_instrument

Name of chosen instrument

property derived_parameters

Derived parameters

list_instruments()[source]

Show loaded instruments and their observing frequency and bandwidth ranges in a pretty format.

property loaded_instruments

Dictionary of each loaded instrument with its respective specified observing frequency and bandwidth ranges

requested_inst_is_applicable(requested_inst_name)[source]

Check if the requested instrument can be selected to be used in the calculations. The already existing user input parameters will be cross checked with the applicable ranges of the requested instrument.

Parameters:

requested_inst_name (String) – name of the requested instrument

Returns:

applicability of requested instrument

Return type:

boolean

reset()[source]

Resets all calculator parameters to their initial values.

property telescope_and_environment

Telescope and environment parameters

property user_input

User inputs to the calculation

class atlast_sc.derived_groups.AtmosphereParams[source]

Class used to retrieve atmospheric parameters from a model.

The AM model was used to produce a grid of T_atm and tau_atm. (Use of AM model described in am_code/README.md.) The code interpolates over the grids to get the correct values for tau_atm and T_atm.

calculate_atmospheric_temperature(obs_freq, weather)[source]

Calculate the atmospheric temperature T_atm

Parameters:
  • obs_freq (astropy.units.Quantity) – the central observing frequency

  • weather (float) – the precipitable water vapour

Returns:

Atmospheric temperature

Return type:

astropy.units.Quantity

calculate_transmittance(obs_freq, weather, elevation)[source]

Calculate the atmospheric transmittance

Parameters:
  • obs_freq (astropy.units.Quantity) – the central observing frequency

  • weather (float) – the precipitable water vapour

  • elevation (astropy.units.Quantity) – elevation of the target

Returns:

Atmospheric transmittance

Return type:

astropy.units.Quantity

class atlast_sc.derived_groups.Efficiencies(obs_freq, surface_rms, eta_ill, eta_spill, eta_block, eta_pol)[source]

Calculates efficiency terms

property eta_a

Get the dish efficiency

property eta_s

Get the system efficiency

class atlast_sc.derived_groups.Temperatures(inst_module, obs_freq, bandwidth, T_cmb, T_amb, eta_eff, T_atm, transmittance, n_pol)[source]

Calculates temperature terms

property T_sky

Get the sky temperature

property T_sys

Get the system temperature

atlast_sc.derived_groups.noise_temperature(temperature, frequency)[source]

Function to convert a thermodynamic temperature to a Rayleigh-Jeans brightness temperature. See e.g. equation 7.5 from Interferometry and Synthesis in Radio Astronomy. Temperature and frequency will need to have astropy units.

class atlast_sc.utils.FileHelper[source]

Class that provides support for reading input parameters from a file and writing outputs to a file. Supported file formats are yaml, txt, and json.

static read_from_file(path, file_name)[source]

Reads the file with name file_name located in directory path and returns a dictionary. The file type (e.g., yaml) is and returns a dictionary. The file type (e.g., yaml) is determined from the file extension in`file_name`.

Parameters:
  • path (str) – The directory where the file is located.

  • file_name (str) – The name of the file, including the file extension.

Returns:

Dictionary of input parameters.

Return type:

dict[str, float]

static read_instrument_yaml_file(file_name)[source]

Reads the file with name file_name located in directory path and returns a namespace. The file type is expected as yaml.

Parameters:

file_name (str) – The name of the file, excluding the file extension.

Returns:

namespace object of yaml blocks.

Return type:

types

static write_to_file(calculator, path, file_name, file_type)[source]

Writes the values stored in calculator to a file with name file_name and extension file_type to location path.

Parameters:
  • calculator (atlast_sc.calculator.Calculator) – A Calculator object.

  • path (str) – The location where the file is saved.

  • file_name (str) – The name of the file to write. Note this should not include the file extension.

  • file_type (str) – The file type (e.g., yaml).