casys.readers
Data readers related sub-modules.
Functions
|
Create a dataset from the fields clips and sources. |
Classes
|
Abstract class representing a casys data reader. |
|
OCTANT CLS data source. |
|
xarray Dataset reader. |
|
xarray Dataset reader for the zarr format. |
|
Reader allowing to read from a set of readers. |
|
OCTANT CLS TableMeasure data reader. |
|
OCTANT TableInSitu data reader. |
|
Reader for the zcollection.Dataset format. |
|
Reader for a swot_calval Collection. |
|
Reader for a Zcollection Collection. |
|
xarray Dataset reader. |
Exceptions
Exception raised when a problem related to data reading occurs. |
- class casys.readers.CLSReader(ges_table_dir=None, **kwargs)
Bases:
CasysReader
,ABC
OCTANT CLS data source.
- Parameters:
ges_table_dir (
str
|None
) – Path of the GES_TABLE_DIR to use.date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
- FIELDS_SOURCE_FULL_CHECK: bool = True
- FORBIDDEN_PARAMETERS: list[str] = []
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = ['date_start', 'date_end']
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader()
Return a version of the reader that might be used on a dask worker.
- Parameters:
kwargs – Additional reader parameters.
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- property fields
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- abstract get_table()
Instantiate a CLS table.
- Return type:
- Returns:
New instance of a CLS table.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.period (
int
) – Period’s number to read.include_end (
bool
) – Whether to include the end date or not.
- Returns:
Fields content as a Dataset
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]] |None
) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- class casys.readers.CLSTableInSituReader(sensor_type, sensor_name, ges_table_dir=None, *, date_start=None, date_end=None, select_clip=None, select_shape=None, data_cleaner=None, orf=None, reference_track=None, time='time', longitude='LONGITUDE', latitude='LATITUDE', longitude_nadir='longitude_nadir', latitude_nadir='latitude_nadir', cycle_number='CYCLE_NUMBER', pass_number='PASS_NUMBER', cross_track_distance='cross_track_distance', swath_lines='num_lines', swath_pixels='num_pixels')
Bases:
CLSReader
OCTANT TableInSitu data reader.
- Parameters:
sensor_type (
str
) – Type of the in situ sensor.sensor_name (
str
) – Name of the insitu sensor.ges_table_dir (
str
|None
) – Path of the GES_TABLE_DIR to use.date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
- FIELDS_SOURCE_FULL_CHECK: bool = True
- FORBIDDEN_PARAMETERS: list[str] = []
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = ['date_start', 'date_end']
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader()
Return a version of the reader that might be used on a dask worker.
- Parameters:
kwargs – Additional reader parameters.
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- property fields
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- get_table()
Instantiate a CLS table.
- Return type:
- Returns:
New instance of a CLS table.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.period (
int
) – Period’s number to read.include_end (
bool
) – Whether to include the end date or not.
- Returns:
Fields content as a Dataset
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]] |None
) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- class casys.readers.CLSTableReader(name, ges_table_dir=None, *, date_start=None, date_end=None, select_clip=None, select_shape=None, data_cleaner=None, orf=None, reference_track=None, time='time', longitude='LONGITUDE', latitude='LATITUDE', longitude_nadir='longitude_nadir', latitude_nadir='latitude_nadir', cycle_number='CYCLE_NUMBER', pass_number='PASS_NUMBER', cross_track_distance='cross_track_distance', swath_lines='num_lines', swath_pixels='num_pixels')
Bases:
CLSReader
OCTANT CLS TableMeasure data reader.
- Parameters:
name (
str
) – Table’s name.ges_table_dir (
str
|None
) – Path of the GES_TABLE_DIR to use.date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
- FIELDS_SOURCE_FULL_CHECK: bool = True
- FORBIDDEN_PARAMETERS: list[str] = []
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = ['date_start', 'date_end']
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader()
Return a version of the reader that might be used on a dask worker.
- Parameters:
kwargs – Additional reader parameters.
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- property fields
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- get_table()
Instantiate a CLS table.
- Return type:
- Returns:
New instance of a CLS table.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.period (
int
) – Period’s number to read.include_end (
bool
) – Whether to include the end date or not.
- Returns:
Fields content as a Dataset
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]] |None
) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- class casys.readers.CasysReader(date_start=None, date_end=None, select_clip=None, select_shape=None, data_cleaner=None, orf=None, reference_track=None, *, time='time', longitude='LONGITUDE', latitude='LATITUDE', longitude_nadir='longitude_nadir', latitude_nadir='latitude_nadir', cycle_number='CYCLE_NUMBER', pass_number='PASS_NUMBER', cross_track_distance='cross_track_distance', swath_lines='num_lines', swath_pixels='num_pixels')
Bases:
ABC
Abstract class representing a casys data reader.
- Parameters:
date_start (
Union
[datetime64
,Timestamp
,datetime
,str
,DateHandler
,None
]) – Starting date of the interval we’re working on.date_end (
Union
[datetime64
,Timestamp
,datetime
,str
,DateHandler
,None
]) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.data_cleaner (
DataCleaner
|None
) – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
Union
[str
,dict
[str
,Any
],Dataset
,ReferenceTrack
,None
]) – Reference track.time – Time field.
longitude – Longitude field.
latitude – Latitude field.
-
KNOWN_PARAMETERS:
dict
[str
,tuple
[Any
,Any
]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
-
RESOURCES:
ClassVar
[CLSResourcesManager
] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- abstract close()
Close used resources.
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- abstract dask_reader(**kwargs)
Return a version of the reader that might be used on a dask worker.
- Parameters:
kwargs – Additional reader parameters.
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- abstract property fields: dict[str, Field]
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
|None
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- abstract read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.include_end (
bool
) – Whether to include the end date or not.
- Return type:
- Returns:
Fields content as a Dataset
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]] |None
) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- exception casys.readers.CasysReaderError
Bases:
AltiDataError
Exception raised when a problem related to data reading occurs.
- add_note(object, /)
Exception.add_note(note) – add a note to the exception
- args
- with_traceback(object, /)
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class casys.readers.DatasetReader(data=None, data_path=None, backend_fields=None, backend_kwargs=None, *, date_start=None, date_end=None, select_clip=None, select_shape=None, data_cleaner=None, orf=None, reference_track=None, time='time', longitude='LONGITUDE', latitude='LATITUDE', longitude_nadir='longitude_nadir', latitude_nadir='latitude_nadir', cycle_number='CYCLE_NUMBER', pass_number='PASS_NUMBER', cross_track_distance='cross_track_distance', swath_lines='num_lines', swath_pixels='num_pixels')
Bases:
CasysReader
xarray Dataset reader.
- Parameters:
data_path (
str
|list
[str
] |None
) – Dataset’s file(s) path.backend_fields (
list
[str
] |None
) – List of fields (variables) to read.backend_kwargs (
dict
[str
,Any
] |None
) – kwargs to provide to the backend when using a data_path to load the data.date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
swath_lines – Swath main dimension.
swath_pixels – Swath cross_track dimension.
cycle_number – The cycle number field.
pass_number – The pass number field.
longitude_nadir – The nadir’s longitude field.
latitude_nadir – The nadir’s latitude field.
cross_track_distance – Cross track distance field.
- FIELDS_SOURCE_FULL_CHECK: bool = True
- FORBIDDEN_PARAMETERS: list[str] = []
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = []
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader(data_dask=None)
Return a version of the reader that might be used on a dask worker.
- Parameters:
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- property fields
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
|None
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.period (
int
) – Period’s number to read.include_end (
bool
) – Whether to include the end date or not.
- Returns:
Fields content as a Dataset
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]]) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- class casys.readers.MultiReader(readers, markers=None, tolerance=np.timedelta64(0, 'ns'), *, date_start=None, date_end=None, select_clip=None, select_shape=None, data_cleaner=None, orf=None, reference_track=None, time='time', longitude='LONGITUDE', latitude='LATITUDE', longitude_nadir='longitude_nadir', latitude_nadir='latitude_nadir', cycle_number='CYCLE_NUMBER', pass_number='PASS_NUMBER', cross_track_distance='cross_track_distance', swath_lines='num_lines', swath_pixels='num_pixels')
Bases:
CasysReader
Reader allowing to read from a set of readers.
The first reader is used as reference (for time and coordinates). Fields from all readers are available and prefixed by the provided markers.
- Parameters:
readers (
list
[CasysReader
]) – List of readers.markers (
list
[str
]) – List of field’s prefixes for each reader. Default toSx_
with x being the reader’s number.tolerance (
timedelta64
) – Gap’s tolerance used to fill missing indexes from a reader when aligning it on the reference’s reader’s index (default to 0).date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
- FIELDS_SOURCE_FULL_CHECK: bool = True
- FORBIDDEN_PARAMETERS: list[str] = []
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = []
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- Parameters:
- Raises:
CasysReaderError – If the provided field is not valid.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader(**kwargs)
Return a version of the reader that might be used on a dask worker.
- Parameters:
kwargs – Additional reader parameters.
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- property fields: dict[str, Field]
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.period (
int
) – Period’s number to read.include_end (
bool
) – Whether to include the end date or not.
- Return type:
- Returns:
Fields content as a Dataset
- property reader_ref: CasysReader
- property readers: list[CasysReader]
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]]) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- property tolerance: timedelta64
- class casys.readers.ScCollectionReader(collection=None, data_path=None, backend_fields=None, backend_kwargs=None, *, date_start=None, date_end=None, data_cleaner=None, orf=None, time='time', longitude='LONGITUDE', latitude='LATITUDE', longitude_nadir='longitude_nadir', latitude_nadir='latitude_nadir', cycle_number='CYCLE_NUMBER', pass_number='PASS_NUMBER', cross_track_distance='cross_track_distance', swath_lines='num_lines', swath_pixels='num_pixels')
Bases:
ZCollectionReader
Reader for a swot_calval Collection.
- Parameters:
collection (
Collection
|None
) – Collection.backend_fields (
list
[str
] |None
) – List of fields (variables) to read.backend_kwargs (
dict
|None
) – Kwargs dictionary to pass to the underlying collection.date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
swath_lines – Swath main dimension.
swath_pixels – Swath cross_track dimension.
cycle_number – The cycle number field.
pass_number – The pass number field.
longitude_nadir – The nadir’s longitude field.
latitude_nadir – The nadir’s latitude field.
cross_track_distance – Cross track distance field.
- FIELDS_SOURCE_FULL_CHECK: bool = True
- FORBIDDEN_PARAMETERS: list[str] = ['select_clip', 'select_shape', 'reference_track']
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = []
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- property collection
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader(data_dask=None)
Return a version of the reader that might be used on a dask worker.
- Parameters:
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- property fields
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
|None
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- load_zdata()
Load data from the collection.
- Return type:
Dataset
- Returns:
Data as a zcollection.Dataset.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.period (
int
) – Period’s number to read.include_end (
bool
) – Whether to include the end date or not.
- Returns:
Fields content as a Dataset
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]]) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- property zdata: Dataset
Data as a zcollection Dataset.
- class casys.readers.StoreReader(store=None, store_path=None, analyse_type=CUSTOM, analyse_date=None, auto=False, **kwargs)
Bases:
CasysReader
xarray Dataset reader.
- Parameters:
store (
DiagnosticStore
|None
) – Diagnostic store.analyse_type (
FreqType
|str
) – Type of period covered by this analyse (cycle, pass or custom). It’s used to determine the type of storage group to create.analyse_date (
Union
[datetime64
,Timestamp
,datetime
,str
,DateHandler
]) – Date representing the set of data used in this analyse. It’s used to determine at which timestamp to store non-temporal diagnostics.auto (
bool
) – Whether to automatically detect and add existing diagnostics or not.date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
- FIELDS_SOURCE_FULL_CHECK: bool = False
- FORBIDDEN_PARAMETERS: list[str] = []
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = []
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- property analyse_date: datetime64 | None
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Not checking fields here.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader()
Return a version of the reader that might be used on a dask worker.
- Parameters:
kwargs – Additional reader parameters.
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- diag_group(name)
Group’s name of a diagnostic or None if unknown.
- property fields: dict[str, Field]
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
|None
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Not used.
- Parameters:
start (
datetime64
|None
)end (
datetime64
|None
)period (
int
)include_end (
bool
)
- Return type:
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]] |None
) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- property store: DiagnosticStore
- class casys.readers.ZCollectionReader(collection=None, data_path=None, backend_fields=None, backend_kwargs=None, *, date_start=None, date_end=None, data_cleaner=None, orf=None, time='time', longitude='LONGITUDE', latitude='LATITUDE', longitude_nadir='longitude_nadir', latitude_nadir='latitude_nadir', cycle_number='CYCLE_NUMBER', pass_number='PASS_NUMBER', cross_track_distance='cross_track_distance', swath_lines='num_lines', swath_pixels='num_pixels')
Bases:
ZDatasetReader
Reader for a Zcollection Collection.
- Parameters:
collection (
Collection
|None
) – Collection.backend_fields (
list
[str
] |None
) – List of fields (variables) to read.backend_kwargs (
dict
|None
) – Kwargs dictionary to pass to the underlying collection.date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
swath_lines – Swath main dimension.
swath_pixels – Swath cross_track dimension.
cycle_number – The cycle number field.
pass_number – The pass number field.
longitude_nadir – The nadir’s longitude field.
latitude_nadir – The nadir’s latitude field.
cross_track_distance – Cross track distance field.
- FIELDS_SOURCE_FULL_CHECK: bool = True
- FORBIDDEN_PARAMETERS: list[str] = ['select_clip', 'select_shape', 'reference_track']
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = []
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- property collection
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader(data_dask=None)
Return a version of the reader that might be used on a dask worker.
- Parameters:
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- property fields
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
|None
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- load_zdata()
Load data from the collection.
- Return type:
Dataset
- Returns:
Data as a zcollection.Dataset.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.period (
int
) – Period’s number to read.include_end (
bool
) – Whether to include the end date or not.
- Returns:
Fields content as a Dataset
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]]) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- property zdata: Dataset
Data as a zcollection Dataset.
- class casys.readers.ZDatasetReader(data, data_path=None, backend_fields=None, *, date_start=None, date_end=None, data_cleaner=None, orf=None, time='time', longitude='LONGITUDE', latitude='LATITUDE', longitude_nadir='longitude_nadir', latitude_nadir='latitude_nadir', cycle_number='CYCLE_NUMBER', pass_number='PASS_NUMBER', cross_track_distance='cross_track_distance', swath_lines='num_lines', swath_pixels='num_pixels')
Bases:
DatasetReader
Reader for the zcollection.Dataset format.
- Parameters:
data (
Dataset
) – ZCollection Dataset.backend_fields (
list
[str
] |None
) – List of fields (variables) to read.backend_kwargs – kwargs to provide to the backend when using a data_path to load the data.
date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
swath_lines – Swath main dimension.
swath_pixels – Swath cross_track dimension.
cycle_number – The cycle number field.
pass_number – The pass number field.
longitude_nadir – The nadir’s longitude field.
latitude_nadir – The nadir’s latitude field.
cross_track_distance – Cross track distance field.
- FIELDS_SOURCE_FULL_CHECK: bool = True
- FORBIDDEN_PARAMETERS: list[str] = ['select_clip', 'select_shape', 'reference_track']
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = []
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader(data_dask=None)
Return a version of the reader that might be used on a dask worker.
- Parameters:
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- property fields
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
|None
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.period (
int
) – Period’s number to read.include_end (
bool
) – Whether to include the end date or not.
- Returns:
Fields content as a Dataset
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]]) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.
- property zdata: Dataset
Data as a zcollection Dataset.
- class casys.readers.ZarrDatasetReader(data=None, data_path=None, backend_fields=None, backend_kwargs=None, *, date_start=None, date_end=None, select_clip=None, select_shape=None, data_cleaner=None, orf=None, reference_track=None, time='time', longitude='LONGITUDE', latitude='LATITUDE', longitude_nadir='longitude_nadir', latitude_nadir='latitude_nadir', cycle_number='CYCLE_NUMBER', pass_number='PASS_NUMBER', cross_track_distance='cross_track_distance', swath_lines='num_lines', swath_pixels='num_pixels')
Bases:
DatasetReader
xarray Dataset reader for the zarr format.
- Parameters:
data_path (
str
|list
[str
] |None
) – Dataset’s file(s) path.backend_fields (
list
[str
] |None
) – List of fields (variables) to read.backend_kwargs (
dict
[str
,Any
] |None
) – kwargs to provide to the backend when using a data_path to load the data.date_start – Starting date of the interval we’re working on.
date_end – Ending date of the interval we’re working on.
select_clip – Selection clip allowing to work on a subset of the source’s data.
select_shape – Shape file, GeoDataFrame or Geometry to select.
data_cleaner – Data cleaning applied just after the reader. This cleaning might consist of sorting, duplication removal or removing indexes in order to keep them increasing.
orf – Source’s indexer.
reference_track – Reference track.
time – Time field.
longitude – Longitude field.
latitude – Latitude field.
- FIELDS_SOURCE_FULL_CHECK: bool = True
- FORBIDDEN_PARAMETERS: list[str] = []
- KNOWN_PARAMETERS: dict[str, tuple[Any, Any]] = {'cross_track_distance': ('Optional[str]', 'cross_track_distance'), 'cycle_number': ('Optional[str]', 'CYCLE_NUMBER'), 'data_cleaner': ('Optional[DataCleaner]', None), 'date_end': ('Optional[DateType]', None), 'date_start': ('Optional[DateType]', None), 'latitude': ('Optional[str]', 'LATITUDE'), 'latitude_nadir': ('Optional[str]', 'latitude_nadir'), 'longitude': ('Optional[str]', 'LONGITUDE'), 'longitude_nadir': ('Optional[str]', 'longitude_nadir'), 'orf': ('Optional[PassIndexer | str]', None), 'pass_number': ('Optional[str]', 'PASS_NUMBER'), 'reference_track': ('Optional[ReferenceTrackType]', None), 'select_clip': ('Optional[str]', None), 'select_shape': ('Optional[str | gpd.GeoDataFrame | shg.Polygon]', None), 'swath_lines': ('Optional[str]', 'num_lines'), 'swath_pixels': ('Optional[str]', 'num_pixels'), 'time': ('Optional[str]', 'time')}
- REQUIRED_PARAMETERS: list[str] = []
- RESOURCES: ClassVar[ong_data_cls.CLSResourcesManager] = <octantng.data.cls.resources.CLSResourcesManager object>
- apply_clip(data)
Apply reader’s selection clip to the provided data.
- apply_shape(data, with_clip=False)
Apply reader’s shape selection to the provided data.
- check_empty()
Check whether the reader contains data or not.
- check_field(field, fields_ext=None, fill_properties=False)
Check the provided field validity.
- check_fields_source(fields)
Check that the provided fields exists in this reader.
- Parameters:
- Raises:
CasysReaderError – If one or more fields do not exist.
- close()
Close used resources.
- computation_dates(index, freq)
Computation starting and ending time for the provided parameters.
- Parameters:
- Return type:
tuple
[datetime64
|None
,datetime64
|None
]- Returns:
(start, end) dates.
- dask_reader(data_dask=None)
Return a version of the reader that might be used on a dask worker.
- Parameters:
- Return type:
- Returns:
Dask worker compatible reader.
- property date_end: DateHandler
- property date_np_end: datetime64 | None
- property date_np_start: datetime64 | None
- property date_start: DateHandler
- property fields
Returns the dictionary of existing fields in the source.
- Returns:
List of existing fields as Field objects.
- have_special_fields(fields)
Check whether provided fields are set or not.
- initialize(check_coords=True, force=True, time_extension=False, real_start=None)
Check and initialize reader’s parameters.
- Parameters:
check_coords (
bool
) – Whether to check coordinates or not.force (
bool
) – Whether to initialize if already initialized or not.time_extension (
bool
) – Whether reader before or after initialization dates is allowed or not.real_start (
datetime64
|None
) – Real starting time of this processing. This is used to normalize interpolation index.
- light_reader(freq, start, end)
Return a light version of the reader (that might be scattered on dask).
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.
- Return type:
- Returns:
Lightened and dask compatible reader.
- property orf: PassIndexer | None
- pre_computed_diagnostics()
List of pre-computed diagnostics (mainly used for stored diagnostics).
- Return type:
- Returns:
List of pre-computed diagnostics.
- read_data(fields, start=None, end=None, period=None, include_end=True)
Read the requested fields and rename them according to the dictionary.
- Parameters:
fields (
dict
[str
,Field
]) – Dictionary of fields names matched to their source.start (
datetime64
|None
) – Starting date of the data to get.end (
datetime64
|None
) – Ending date of the data to get.period (
int
) – Period’s number to read.include_end (
bool
) – Whether to include the end date or not.
- Returns:
Fields content as a Dataset
- property real_start: datetime64 | None
- property reference_track: ReferenceTrack | None
- reset_periods()
Reset the reader’s periods to None.
- property select_shape: GeoDataFrame | None
- set_dask_processing(freq, start, end, reference=None)
Do whatever needs to be done in case of a dask usage.
- Parameters:
freq (
FrequencyHandler
) – Frequency handler used for parallelization.start (
datetime64
) – Starting date of the required data.end (
datetime64
) – Ending date of the required data.reference (
list
[tuple
[int
,int
]]) – List of reference’s orbits.
- set_parameters(*, date_start=None, date_end=None, select_clip=None, select_shape=None, orf=None, reference_track=None, swath=False, **kwargs)
Method allowing to set reader’s parameters if unset.
- Parameters:
date_start (
DateHandler
|None
) – Starting date of the interval we’re working on.date_end (
DateHandler
|None
) – Ending date of the interval we’re working on.select_clip (
str
|None
) – Selection clip allowing to work on a subset of the source’s data.select_shape (
str
|GeoDataFrame
|Polygon
|None
) – Shape file, GeoDataFrame or Geometry to select.orf (
PassIndexer
|str
|None
) – Source’s indexer.reference_track (
ReferenceTrack
|None
) – Reference track.swath (
bool
) – Whether this reader contains swath type data or not.kwargs – Special fields.
- classmethod set_signature()
Fix the class initialization signature.