Skip to content

Commit

Permalink
Add the available transforms to the public API
Browse files Browse the repository at this point in the history
  • Loading branch information
golmschenk committed May 2, 2024
1 parent 92f55ae commit 86926af
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/source/tutorials/crafting_standard_datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ However, the uniform length is set to a specific default value. A good choice fo

```python
from functools import partial
from qusi.data import default_light_curve_post_injection_transform
from qusi.transform import default_light_curve_post_injection_transform
```

Then, were we specify the construction of our dataset, we'll add an additional input parameter. So taking what we had in the previous tutorial, we can now change the dataset creation statement to:
Expand Down
7 changes: 2 additions & 5 deletions src/qusi/data.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
"""
Data related public interface.
Data structure related public interface.
"""
from qusi.internal.finite_standard_light_curve_dataset import FiniteStandardLightCurveDataset
from qusi.internal.finite_standard_light_curve_observation_dataset import FiniteStandardLightCurveObservationDataset
from qusi.internal.light_curve import LightCurve
from qusi.internal.light_curve_dataset import LightCurveDataset, default_light_curve_post_injection_transform, \
default_light_curve_observation_post_injection_transform
from qusi.internal.light_curve_collection import LightCurveObservationCollection, LightCurveCollection
from qusi.internal.light_curve_dataset import LightCurveDataset

__all__ = [
'FiniteStandardLightCurveDataset',
Expand All @@ -15,6 +14,4 @@
'LightCurveCollection',
'LightCurveDataset',
'LightCurveObservationCollection',
'default_light_curve_post_injection_transform',
'default_light_curve_observation_post_injection_transform',
]
19 changes: 19 additions & 0 deletions src/qusi/transform.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Data transform related public interface.
"""
from qusi.internal.light_curve_dataset import default_light_curve_post_injection_transform, \
default_light_curve_observation_post_injection_transform, make_fluxes_and_label_array_uniform_length
from qusi.internal.light_curve_observation import remove_nan_flux_data_points_from_light_curve_observation, \
randomly_roll_light_curve_observation
from qusi.internal.light_curve_transforms import from_light_curve_observation_to_fluxes_array_and_label_array, \
pair_array_to_tensor

__all__ = [
'default_light_curve_post_injection_transform',
'default_light_curve_observation_post_injection_transform',
'from_light_curve_observation_to_fluxes_array_and_label_array',
'make_fluxes_and_label_array_uniform_length',
'pair_array_to_tensor',
'randomly_roll_light_curve_observation',
'remove_nan_flux_data_points_from_light_curve_observation',
]

0 comments on commit 86926af

Please sign in to comment.