-
Notifications
You must be signed in to change notification settings - Fork 7
Description
🐳 Whaaaat
The old zoom export feature appears to be wanted by users (@PCarvaillo @PaulCarvaillo).
We'll try to give it a little glow-up and integrate it nicely in the new API.
🐳 Design idea(s)
I'll add here more sections if we have other ideas:
🐬 Core zoom datasets with Public zoom relation
Here is how I first see the thing: Each zoom level would be a Core dataset, and the relationship between the different zooms would be stored in the public API Dataset.
Example:
analysis = Analysis(AnalysisType.SPECTROGRAM
begin=Timestamp("2022-09-25 22:35:00"),
end=Timestamp("2022-09-25 22:35:30"),
data_duration=Timedelta(seconds=15),
zoom_levels=(2,3),
)The zoom_level=(2,3) parameter means that additionnaly to the analysis SpectroDataset with 15-seconds long spectrograms, 2 other SpectroDatasets with 7.5s and 5s-long spectrograms will be exported:
processed
├── analysis
│ ├── spectrogram
│ │ ├── 2022_09_25_22_35_00_000000.png
│ │ └── 2022_09_25_22_35_15_000000.png
│ └── analysis.json
├── analysis_z2
│ ├── spectrogram
│ │ ├── 2022_09_25_22_35_00_000000.png
│ │ ├── 2022_09_25_22_35_07_500000.png
│ │ ├── 2022_09_25_22_35_15_000000.png
│ │ └── 2022_09_25_22_35_22_500000.png
│ └── analysis_z2.json
└── analysis_z3
├── spectrogram
│ ├── 2022_09_25_22_35_00_000000.png
│ ├── 2022_09_25_22_35_05_000000.png
│ ├── 2022_09_25_22_35_10_000000.png
│ ├── 2022_09_25_22_35_15_000000.png
│ ├── 2022_09_25_22_35_20_000000.png
│ └── 2022_09_25_22_35_25_000000.png
└── analysis_z3.json
And the relationship between the zoom datasets and their original-length counterpart would be stored in the public dataset, with something like that:
{
"datasets": {
"original": {
"analysis": "original",
"class": "AudioDataset",
"zoom": {
"level": 1,
"zoomed_from": "original"
},
"json": "C:\\Users\\berthoga\\Documents\\Datasets\\small_dataset\\data\\audio\\original\\original.json"
},
"analysis": {
"analysis": "analysis",
"class": "SpectroDataset",
"zoom": {
"level": 1,
"zoomed_from": "analysis"
},
"json": "C:\\Users\\berthoga\\Documents\\Datasets\\small_dataset\\processed\\analysis\\analysis.json"
},
"analysis_z2": {
"analysis": "analysis",
"class": "SpectroDataset",
"zoom": {
"level": 2,
"zoomed_from": "analysis"
},
"json": "C:\\Users\\berthoga\\Documents\\Datasets\\small_dataset\\processed\\analysis_z2\\analysis_z2.json"
},
"analysis_z3": {
"analysis": "analysis",
"class": "SpectroDataset",
"zoom": {
"level": 3,
"zoomed_from": "analysis"
},
"json": "C:\\Users\\berthoga\\Documents\\Datasets\\small_dataset\\processed\\analysis_z3\\analysis_z3.json"
}
},
"depth": 0.0,
"folder": "C:\\Users\\berthoga\\Documents\\Datasets\\small_dataset",
"gps_coordinates": [
0,
0
],
"instrument": null,
"strptime_format": "%y%m%d%H%M%S",
"timezone": null
}What do you guys think?