gdr3apcal package#
Subpackages#
Submodules#
gdr3apcal.calibration module#
gdr3apcal.calibration_models module#
Interfaces to various flavors of models
- class gdr3apcal.calibration_models.CalibrationModel(name: str, model: Union[Callable, BaseEstimator], features: Sequence[str], label: str)[source]#
Bases:
object
single generic model wrapper
- class gdr3apcal.calibration_models.CalibrationModelGrouped(name: str, models: dict, features: Sequence[str], label: str, groupby: str)[source]#
Bases:
CalibrationModel
A convenient collection of models that apply on grouped data This is used to handle the individual calibrations of the spectral libraries of GSP-Phot.
- class gdr3apcal.calibration_models.CallableModel(name: str, model: Callable, features: Sequence[str], label: str)[source]#
Bases:
CalibrationModel
Use a single function/callable object as calibration model
- class gdr3apcal.calibration_models.SklearnModel(name: str, model: BaseEstimator, features: Sequence[str], label: str)[source]#
Bases:
CalibrationModel
Using a BaseEstimator API (.predict)
gdr3apcal.config module#
Package important locations
gdr3apcal.downloader module#
Tools to download the model files
- gdr3apcal.downloader.dl_ascii_progress(iterseq: Sequence, total: int = 100, progress_length: int = 50, mininterval: float = 2)[source]#
A simplistic progress indicator in ascii format applicable to a sequence
iterseq: sequence to iter over total: length of the sequence (default is 100 or len(iterseq) when possible) progress_length: number of characters used by the indicator mininterval: how long to wait before updating the indicator (default 0.5 seconds)
gdr3apcal.mars_converter module#
Tools to convert pyearth.Earth models to python source code
The method to remove pyearth depencency is a little bit convoluted. We basically extract the equations of the models and write them into a python script.
One could imagine making a dump of the function call. However, this does not work in python. Python will look for the original module of the function. (regardless of using joblib, or dill) We did not find a way to deep dump the functions.
gdr3apcal.repositories module#
Simplified access to storage
- class gdr3apcal.repositories.BaseRepository(repo: str, **kwargs)[source]#
Bases:
object
Base class for downloading from specific locations
- class gdr3apcal.repositories.HTTP(repo: str, **kwargs)[source]#
Bases:
BaseRepository
Direct download from URL {repo}/{filename}
- class gdr3apcal.repositories.Keeper(repo: str, **kwargs)[source]#
Bases:
BaseRepository
Make a simplified interface to a folder on Keeper/Seafile