NcFileIO¶
- class tolteca.datamodels.io.NcFileIO(source=None, open_=True, load_meta_on_open=True, auto_close_on_pickle=True)[source]¶
Bases:
tolteca.datamodels.io.base.DataFileIO
,tolteca.datamodels.io.toltec.kidsdata._NcFileIOKidsDataAxisSlicerMixin
A class to read data from TolTEC netCDF files.
- Parameters
- sourcestr,
pathlib.Path
,FileLoc
,netCDF4.Dataset
The data file location or netCDF dataset. This is passed to
NcNodeMapper
.- open_bool
If True and
source
is set, open the file.- load_meta_on_openbool
If True, the meta data will be loaded upon opening of the file.
- auto_close_on_picklebool
If True, the dataset is automatically closed when pickling. This is ignored if
source
is None.
- sourcestr,
Attributes Summary
The axis slicer for locating block.
The data kind.
The underlying netCDF dataset.
The tree of low level netCDF dataset mappers.
The axis slicer for locating sample.
The axis slicer for locating sweep.
The axis slicer for locating time.
The axis slicer for locating tone.
Methods Summary
get_sweep_axis_data
([block_index])Return the tones at
block_index
.get_tone_axis_data
([block_index])Return the tones at
block_index
.open
([source])Return a context to operate on
source
.read
(**slicer_args)Read the file and return a data object.
Attributes Documentation
- axis_types¶
- block_loc¶
The axis slicer for locating block.
- data_kind¶
The data kind.
- io_registry_info = {'identifier': <function identify_toltec_nc_file>, 'label': 'nc.toltec.kidsdata'}¶
- logger = <Logger NcFileIO (DEBUG)>¶
- meta¶
- nc_node¶
The underlying netCDF dataset.
- node_mappers¶
The tree of low level netCDF dataset mappers.
- sample_loc¶
The axis slicer for locating sample.
- sweep_loc¶
The axis slicer for locating sweep.
- time_loc¶
The axis slicer for locating time.
- tone_loc¶
The axis slicer for locating tone.
Methods Documentation
- open(source=None)[source]¶
Return a context to operate on
source
.- Parameters
- sourcestr,
pathlib.Path
,FileLoc
,netCDF4.Dataset
, optional The data file location or netCDF dataset. If None, the source passed to constructor is used. Noe that source has to be None if it has been specified in the constructor.
- sourcestr,