Struct mwalib::MetafitsContext
source · pub struct MetafitsContext {Show 75 fields
pub mwa_version: Option<MWAVersion>,
pub obs_id: u32,
pub sched_start_gps_time_ms: u64,
pub sched_end_gps_time_ms: u64,
pub sched_start_unix_time_ms: u64,
pub sched_end_unix_time_ms: u64,
pub sched_start_utc: DateTime<FixedOffset>,
pub sched_end_utc: DateTime<FixedOffset>,
pub sched_start_mjd: f64,
pub sched_end_mjd: f64,
pub sched_duration_ms: u64,
pub dut1: Option<f64>,
pub ra_tile_pointing_degrees: f64,
pub dec_tile_pointing_degrees: f64,
pub ra_phase_center_degrees: Option<f64>,
pub dec_phase_center_degrees: Option<f64>,
pub az_deg: f64,
pub alt_deg: f64,
pub za_deg: f64,
pub az_rad: f64,
pub alt_rad: f64,
pub za_rad: f64,
pub sun_alt_deg: Option<f64>,
pub sun_distance_deg: Option<f64>,
pub moon_distance_deg: Option<f64>,
pub jupiter_distance_deg: Option<f64>,
pub lst_deg: f64,
pub lst_rad: f64,
pub hour_angle_string: String,
pub grid_name: String,
pub grid_number: i32,
pub creator: String,
pub project_id: String,
pub obs_name: String,
pub mode: MWAMode,
pub geometric_delays_applied: GeometricDelaysApplied,
pub cable_delays_applied: CableDelaysApplied,
pub calibration_delays_and_gains_applied: bool,
pub corr_fine_chan_width_hz: u32,
pub corr_int_time_ms: u64,
pub corr_raw_scale_factor: f32,
pub num_corr_fine_chans_per_coarse: usize,
pub volt_fine_chan_width_hz: u32,
pub num_volt_fine_chans_per_coarse: usize,
pub receivers: Vec<usize>,
pub num_receivers: usize,
pub delays: Vec<u32>,
pub num_delays: usize,
pub calibrator: bool,
pub calibrator_source: String,
pub global_analogue_attenuation_db: f64,
pub quack_time_duration_ms: u64,
pub good_time_unix_ms: u64,
pub good_time_gps_ms: u64,
pub num_ants: usize,
pub antennas: Vec<Antenna>,
pub num_rf_inputs: usize,
pub rf_inputs: Vec<Rfinput>,
pub num_ant_pols: usize,
pub num_metafits_timesteps: usize,
pub metafits_timesteps: Vec<TimeStep>,
pub num_metafits_coarse_chans: usize,
pub metafits_coarse_chans: Vec<CoarseChannel>,
pub num_metafits_fine_chan_freqs: usize,
pub metafits_fine_chan_freqs_hz: Vec<f64>,
pub obs_bandwidth_hz: u32,
pub coarse_chan_width_hz: u32,
pub centre_freq_hz: u32,
pub num_baselines: usize,
pub baselines: Vec<Baseline>,
pub num_visibility_pols: usize,
pub metafits_filename: String,
pub oversampled: bool,
pub deripple_applied: bool,
pub deripple_param: String,
}
Expand description
Metafits context. This represents the basic metadata for an MWA observation.
Fields§
§mwa_version: Option<MWAVersion>
mwa version
obs_id: u32
Observation id
sched_start_gps_time_ms: u64
Scheduled start (gps time) of observation
sched_end_gps_time_ms: u64
Scheduled end (gps time) of observation
sched_start_unix_time_ms: u64
Scheduled start (UNIX time) of observation
sched_end_unix_time_ms: u64
Scheduled end (UNIX time) of observation
sched_start_utc: DateTime<FixedOffset>
Scheduled start (UTC) of observation
sched_end_utc: DateTime<FixedOffset>
Scheduled end (UTC) of observation
sched_start_mjd: f64
Scheduled start (MJD) of observation
sched_end_mjd: f64
Scheduled end (MJD) of observation
sched_duration_ms: u64
Scheduled duration of observation
dut1: Option<f64>
DUT1 (i.e. UTC-UT1). The UTC of the obsid is used to determine this value. Calculated by astropy. Made optional for compatibility.
ra_tile_pointing_degrees: f64
RA tile pointing
dec_tile_pointing_degrees: f64
DEC tile pointing
ra_phase_center_degrees: Option<f64>
RA phase centre
dec_phase_center_degrees: Option<f64>
DEC phase centre
az_deg: f64
AZIMUTH of the pointing centre in degrees
alt_deg: f64
ALTITUDE (a.k.a. elevation) of the pointing centre in degrees
za_deg: f64
Zenith angle of the pointing centre in degrees
az_rad: f64
AZIMUTH of the pointing centre in radians
alt_rad: f64
ALTITUDE (a.k.a. elevation) of the pointing centre in radians
za_rad: f64
Zenith angle of the pointing centre in radians
sun_alt_deg: Option<f64>
Altitude of Sun
sun_distance_deg: Option<f64>
Distance from pointing center to Sun
moon_distance_deg: Option<f64>
Distance from pointing center to the Moon
jupiter_distance_deg: Option<f64>
Distance from pointing center to Jupiter
lst_deg: f64
Local Sidereal Time in degrees (at the midpoint of the observation)
lst_rad: f64
Local Sidereal Time in radians (at the midpoint of the observation)
hour_angle_string: String
Hour Angle of pointing center (as a string)
grid_name: String
GRIDNAME
grid_number: i32
GRIDNUM
creator: String
CREATOR
project_id: String
PROJECT
obs_name: String
Observation name
mode: MWAMode
MWA observation mode
geometric_delays_applied: GeometricDelaysApplied
Which Geometric delays have been applied to the data?
cable_delays_applied: CableDelaysApplied
Have cable delays been applied to the data?
calibration_delays_and_gains_applied: bool
Have calibration delays and gains been applied to the data?
corr_fine_chan_width_hz: u32
Correlator fine_chan_resolution
corr_int_time_ms: u64
Correlator mode dump time
corr_raw_scale_factor: f32
Correlator visibility scaling factor used to get the visibilities in Jansky-like units
num_corr_fine_chans_per_coarse: usize
Number of fine channels in each coarse channel for a correlator observation
volt_fine_chan_width_hz: u32
Voltage fine_chan_resolution
num_volt_fine_chans_per_coarse: usize
Number of fine channels in each coarse channel for a voltage observation
receivers: Vec<usize>
Array of receiver numbers
num_receivers: usize
Number of recievers
delays: Vec<u32>
Array of beamformer delays
num_delays: usize
Number of beamformer delays
calibrator: bool
Intended for calibration
calibrator_source: String
Calibrator source
global_analogue_attenuation_db: f64
ATTEN_DB // global analogue attenuation, in dB
quack_time_duration_ms: u64
Seconds of bad data after observation starts
good_time_unix_ms: u64
OBSID+QUACKTIM as Unix timestamp (first good timestep)
good_time_gps_ms: u64
Good time expressed in GPS seconds
num_ants: usize
Total number of antennas (tiles) in the array
antennas: Vec<Antenna>
We also have just the antennas
num_rf_inputs: usize
Total number of rf_inputs (tiles * 2 pols X&Y)
rf_inputs: Vec<Rfinput>
The Metafits defines an rf chain for antennas(tiles) * pol(X,Y)
num_ant_pols: usize
Number of antenna pols. e.g. X and Y
num_metafits_timesteps: usize
Number of timesteps defined in the metafits file
metafits_timesteps: Vec<TimeStep>
Vector of timesteps based on the metafits file
num_metafits_coarse_chans: usize
Number of coarse channels based on the metafits file
metafits_coarse_chans: Vec<CoarseChannel>
Vector of coarse channels based on the metafits file
num_metafits_fine_chan_freqs: usize
Number of fine channels for the whole observation
metafits_fine_chan_freqs_hz: Vec<f64>
Vector of fine channel frequencies for the whole observation
obs_bandwidth_hz: u32
Total bandwidth of observation assuming we have all coarse channels
coarse_chan_width_hz: u32
Bandwidth of each coarse channel
centre_freq_hz: u32
The value of the FREQCENT key in the metafits file, but in Hz.
num_baselines: usize
Number of baselines stored. This is autos plus cross correlations
baselines: Vec<Baseline>
Baslines
num_visibility_pols: usize
Number of polarisation combinations in the visibilities e.g. XX,XY,YX,YY == 4
metafits_filename: String
Filename of the metafits we were given
oversampled: bool
Was this observation using oversampled coarse channels?
deripple_applied: bool
Was deripple applied to this observation?
deripple_param: String
What was the configured deripple_param? If deripple_applied is False then this deripple param was not applied
Implementations§
source§impl MetafitsContext
impl MetafitsContext
sourcepub fn new<P: AsRef<Path>>(
metafits: P,
mwa_version: Option<MWAVersion>
) -> Result<Self, MwalibError>
pub fn new<P: AsRef<Path>>( metafits: P, mwa_version: Option<MWAVersion> ) -> Result<Self, MwalibError>
From a path to a metafits file, create a MetafitsContext
.
§Arguments
-
metafits_filename
- filename of metafits file as a path or string. -
mwa_version
- an Option containing the MWA version the metafits should be interpreted as. Pass None to have mwalib guess based on the MODE in the metafits.
§Returns
- Result containing a populated MetafitsContext object if Ok.
sourcepub fn generate_expected_volt_filename(
&self,
metafits_timestep_index: usize,
metafits_coarse_chan_index: usize
) -> Result<String, VoltageFileError>
pub fn generate_expected_volt_filename( &self, metafits_timestep_index: usize, metafits_coarse_chan_index: usize ) -> Result<String, VoltageFileError>
Trait Implementations§
source§impl Clone for MetafitsContext
impl Clone for MetafitsContext
source§fn clone(&self) -> MetafitsContext
fn clone(&self) -> MetafitsContext
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MetafitsContext
impl Debug for MetafitsContext
Auto Trait Implementations§
impl Freeze for MetafitsContext
impl RefUnwindSafe for MetafitsContext
impl Send for MetafitsContext
impl Sync for MetafitsContext
impl Unpin for MetafitsContext
impl UnwindSafe for MetafitsContext
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more