tlpipe.timestream.time_flag.Timestream¶
-
class
tlpipe.timestream.time_flag.Timestream(files=None, mode='r', start=0, stop=None, dist_axis=0, use_hints=True, comm=None)[source]¶ Container class for the timestream data.
This timestream data container is to hold time stream data that has polarization and baseline separated from the channel pairs in the raw timestream.
:param Same as
container.BasicTod.:Attributes
arrayReturn either a dish array or a cylinder array instance. attrsAttributes attached to this object. blReturn the blorder dataset for convenient use. bl_ordered_datasetsBaseline ordered datasets. commReference to the MPI communicator. dist_axisConvenience for self.main_data_dist_axis. dist_axis_nameName of self.main_data_dist_axis. distributedfeed_ordered_datasetsFeed ordered datasets. fileNot a file at all but the top most MemGroupof the tree.freqReturn the freq dataset for convenient use. freq_ordered_datasetsFrequency ordered datasets. historyThe analysis history for this data. is_continuousData is observed continuous in time? is_cylinderTrue if data is get from cylinder array. is_dishTrue if data is get from dish array. is_same_decData is observed for the same declination in the sky? is_same_pointingThe antenna array is in the same pointing in az, alt? local_blA convenience for bl.local_data. local_freqA convenience for freq.local_data. local_polA convenience for pol.local_data. local_timeA convenience for time.local_data. local_visA convenience for vis.local_data. local_vis_maskA convenience for vis_mask.local_data. main_axes_ordered_datasetsDatasets that have axis aligned with the main data. main_dataThe main data in the container which is a convenience for self[self.main_data_name]. main_data_axesAxes of the main data. main_data_nameMain data in the data container. main_time_ordered_datasetsDatasets that have the first axis aligned with the main data. masked_visReturn a copy of the masked vis. nameString giving the full path to this entry. ondiskWhether the data is stored on disk as opposed to in memory. parentParent MemGroupthat contains this group.polReturn the pol dataset for convenient use. pol_dictA dict maps polarization code to integer. pol_ordered_datasetsPolarization ordered datasets. timeReturn the jul_date dataset for convenient use. time_ordered_attrsAttributes that are different in different files. time_ordered_datasetsTime ordered datasets. visReturn the main data for convenient use. vis_maskA convenience for self[‘vis_mask’]. Methods
add_history([history])Create a new history entry. all_data_operate(func[, copy_data])Operation to the whole vis and vis_mask. apply_mask([fill_val])Applying vis_mask to vis with the fill_val. bl_data_operate(func[, full_data, ...])Data operation along the baseline axis. check_status()Check that data hold in this container is consistent. close()Close underlying hdf5 file if on disk. copy()Return a deep copy of this container. create_bl_ordered_dataset(name, data[, ...])Create a baseline ordered dataset. create_dataset(name, \*args, \*\*kwargs)Create and return a new dataset. create_feed_ordered_dataset(name, data[, ...])Create a feed ordered dataset. create_freq_and_bl_ordered_dataset(name, data)Create a frequency and baseline ordered dataset. create_freq_ordered_dataset(name, data[, ...])Create a frequency ordered dataset. create_group(name)Create and return a new group. create_main_axis_ordered_dataset(axis, name, ...)Create a axis_name ordered dataset. create_main_data(data[, recreate, copy_attrs])Create or recreate a main dataset. create_main_time_ordered_dataset(name, data)Create a main type time ordered dataset. create_pol_ordered_dataset(name, data[, ...])Create a polarization ordered dataset. create_time_and_bl_ordered_dataset(name, data)Create a time and baseline ordered dataset. create_time_and_freq_ordered_dataset(name, data)Create a time and frequency ordered dataset. create_time_ordered_dataset(name, data[, ...])Create a time ordered dataset. data_operate(func[, op_axis, axis_vals, ...])An overload data operation interface. data_select(axis, value)Select data to be loaded from input files along the specified axis. dataset_common_to_distributed(name[, ...])Convert a common dataset to a distributed one. dataset_distributed_to_common(name)Convert a distributed dataset to a common one. dataset_name_allowed(name)Datasets may only be created and accessed in the root level group. delete_a_dataset(name)Delete a dataset and also remove it from the hint if it is in it. delete_an_attribute(name)Delete an attribute and also remove it from the hint if it is in it. feed_select([value, corr])Select data to be loaded from inputs files corresponding to the specified feeds. flush()Flush the buffers of the underlying hdf5 file if on disk. freq_and_bl_data_operate(func[, full_data, ...])Data operation along the frequency and baseline axis. freq_and_pol_data_operate(func[, full_data, ...])Data operation along the frequency and polarization axis. freq_data_operate(func[, full_data, ...])Data operation along the frequency axis. freq_pol_and_bl_data_operate(func[, ...])Data operation along the frequency, polarization and baseline axis. frequency_select(value)Select data to be loaded from input files along the frequency axis. from_file(file_[, ondisk, distributed, ...])Create data object from analysis hdf5 file, store in memory or on disk. from_group([data_group, detect_subclass])Create data object from a given group. get((k[,d]) -> D[k] if k in D, ...)group_name_allowed(name)No groups are exposed to the user. info()List basic information of the data hold by this container. items(() -> list of D’s (key, value) pairs, ...)iteritems(() -> an iterator over the (key, ...)iterkeys(() -> an iterator over the keys of D)itervalues(...)keys(() -> list of D’s keys)lin2stokes()Convert the linear polarized data to Stokes polarization. load_all()Load all attributes and datasets from files. load_common_attrs()Load common attributes from the first file. load_common_datasets()Load common datasets from the first file. load_main_axes_excl_main_data()Load main axes ordered datasets (exclude the main data). load_main_axes_ordered_data()Load main axes ordered dataset. load_main_data()Load main data from all files. load_time_ordered_attrs()Load time ordered attributes from all files. load_time_ordered_datasets()Load time ordered datasets (excepts those also in main_axes_ordered_datasets) from all files. pol_and_bl_data_operate(func[, full_data, ...])Data operation along the polarization and baseline axis. pol_data_operate(func[, full_data, ...])Data operation along the polarization axis. polarization_select(value)Select data to be loaded from input files along the polarization axis. redistribute(dist_axis)Redistribute the main time ordered dataset along a specified axis. require_dataset(name, shape, dtype, \*\*kwargs)Require a dataset to exist, create if it doesn’t. require_group(name)Require a group to exist, create if it doesn’t. save(filename, \*\*kwargs)Save data to hdf5 file. stokes2lin()Convert the Stokes polarized data to linear polarization. subset()Return a subset of the data as a new data container. subset_feed_select([value, corr])Select a subset of the data corresponding to the specified feeds. subset_frequency_select(value)Select a subset of the data along the frequency axis. subset_polarization_select(value)Select a subset of the data along the polarization axis. subset_select(axis, value)Select a subset of the data along the specified axis. subset_time_select(value)Select a subset of the data along the time axis. time_and_bl_data_operate(func[, full_data, ...])Data operation along the time and baseline axis. time_and_freq_data_operate(func[, ...])Data operation along the time and frequency axis. time_and_pol_data_operate(func[, full_data, ...])Data operation along the time and polarization axis. time_data_operate(func[, full_data, ...])Data operation along the time axis. time_freq_and_bl_data_operate(func[, ...])Data operation along the time, frequency and baseline axis. time_freq_and_pol_data_operate(func[, ...])Data operation along the time, frequency and polarization axis. time_pol_and_bl_data_operate(func[, ...])Data operation along the time, polarization and baseline axis. time_select(value)Select data to be loaded from input files along the time axis. to_disk(filename, \*\*kwargs)Return a version of this data that lives on disk. to_files(outfiles[, exclude, check_status, ...])Save the data hold in this container to files. to_memory()Return a version of this data that lives in memory. values(() -> list of D’s values)