pipeline.domain.Field

class Field(field_id: int, name: str, source_id: int, time: NDArray, direction: DirectionDict)[source]

Bases: object

A logical representation of a field in a MeasurementSet.

id

Numerical identifier of this field within the FIELD subtable of the MeasurementSet.

source_id

ID of the source associated with this field.

time

Array of unique observation times for this field.

name

Name of this field, formatted for use as a CASA argument.

intents

Set of unique scan intents associated with this field.

states

Set of unique State objects associated with this field.

valid_spws

Set of unique SpectralWindow objects associated with this field.

flux_densities

Set of unique flux measurements from setjy.

Methods

set_source_type

Update the intent(s) associated with the field based on given source type(s).

set_zd_telmjd

Calculate and set the zenith distance at the observation mid-time.

Attributes

clean_name

Get the field name with illegal characters replaced with underscores.

dec

Return declination for the phasecenter of the field.

frame

Return reference frame code for the Field.

gb

Return declination for the phasecenter of the field.

gl

Return longitude for phasecenter of the field, in DMS format.

identifier

A human-readable identifier for this Field.

latitude

Return latitude for the phasecenter of the field.

longitude

Return longitude for the phasecenter of the field.

mdirection

Return direction measure dictionary for phasecenter of the field.

name

Return name of field, in form that can be used as a CASA argument.

ra

Return right ascension for the phasecenter of the field.

telmjd

Return the Modified Julian Date in a CASA epoch measure dictionary

zd

Return the zenith distance in a CASA quantity quanta dictionary.

__init__(field_id: int, name: str, source_id: int, time: NDArray, direction: DirectionDict) None[source]

Initialize a Field object.

Parameters:
  • field_id -- Field ID.

  • name -- Field name.

  • source_id -- A source ID associated with this field.

  • time -- A list of the unique times for this field.

  • direction -- A CASA 'direction' measure dictionary for the phasecenter of this field.

property clean_name: str

Get the field name with illegal characters replaced with underscores.

This property is used to determine whether the field name, when given as a CASA argument, should be enclosed in quotes.

property dec: str

Return declination for the phasecenter of the field.

property frame: str

Return reference frame code for the Field.

property gb: str

Return declination for the phasecenter of the field.

property gl: str

Return longitude for phasecenter of the field, in DMS format.

property identifier: str

A human-readable identifier for this Field.

property latitude: EpochDict

Return latitude for the phasecenter of the field.

property longitude: EpochDict

Return longitude for the phasecenter of the field.

property mdirection: DirectionDict

Return direction measure dictionary for phasecenter of the field.

property name: str

Return name of field, in form that can be used as a CASA argument.

property ra: str

Return right ascension for the phasecenter of the field.

set_source_type(source_type: str) None[source]

Update the intent(s) associated with the field based on given source type(s).

Source types from VLA datasets are translated to equivalent ALMA Pipeline intents.

Parameters:

source_type -- String containing the source type(s) (aka intents) associated with the field.

set_zd_telmjd(observatory: str) None[source]

Calculate and set the zenith distance at the observation mid-time.

Parameters:

observatory -- Name of the observatory (e.g., 'VLA', 'ALMA').

property telmjd: QuantityDict

Return the Modified Julian Date in a CASA epoch measure dictionary

property zd: QuantityDict

Return the zenith distance in a CASA quantity quanta dictionary.