Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metadata writing to new ingestion routines. #50

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5b15ed5
Add new loader code
samueljackson92 Dec 11, 2024
7178a9a
Fix ruff
samueljackson92 Dec 11, 2024
76ed719
Update tests to conditionally skip
samueljackson92 Dec 11, 2024
3184d9b
Fix ruff
samueljackson92 Dec 11, 2024
185e8ce
Update tests
samueljackson92 Dec 11, 2024
df8462e
revert to ignoring tests in CI until mastcodes is ready.
samueljackson92 Dec 13, 2024
01ba84f
Merge branch 'main' into 34-updated-reader
samueljackson92 Dec 13, 2024
0b23202
Skip more tests
samueljackson92 Dec 13, 2024
d32af1c
Refactor cli and workflow code
samueljackson92 Dec 13, 2024
0aa1f9a
refactor pipelines
samueljackson92 Dec 13, 2024
763278a
Update processing for amc
samueljackson92 Dec 13, 2024
c59d689
Add fix for names
samueljackson92 Dec 13, 2024
b5207d6
Update renaming dims
samueljackson92 Dec 16, 2024
d6b5e21
Update unit mappings
samueljackson92 Dec 16, 2024
9bb6b53
Update workflow code
samueljackson92 Dec 17, 2024
a05baa5
Ruff formatting
samueljackson92 Dec 17, 2024
200731b
Update requirements.txt
samueljackson92 Dec 17, 2024
81d257f
Update mappings
samueljackson92 Dec 17, 2024
88d06bc
Update CI
samueljackson92 Dec 17, 2024
f1d221d
Update tests
samueljackson92 Dec 17, 2024
3754551
fix ruff
samueljackson92 Dec 17, 2024
82238e8
Update workflow to upload to s3
samueljackson92 Dec 18, 2024
cbe659f
remove unused file
samueljackson92 Dec 18, 2024
51692ca
Add code to rename groups
samueljackson92 Dec 18, 2024
418cd84
Tidy up name mappings
samueljackson92 Dec 18, 2024
b44d0a7
Update mappings and pipelines for better harmony
samueljackson92 Dec 18, 2024
255360c
Add unit test
samueljackson92 Dec 18, 2024
9b16462
Fix ruff
samueljackson92 Dec 18, 2024
b42f063
Fix historical mappings
samueljackson92 Dec 18, 2024
8c5b7ba
Add bes
samueljackson92 Dec 18, 2024
c1f69db
Fix tests
samueljackson92 Dec 18, 2024
ff49aa9
Update install instructions
samueljackson92 Jan 2, 2025
5e5d558
Checkpoint work on mappings
samueljackson92 Jan 2, 2025
c2ed67b
Update mappings and trasforms for MAST-U
samueljackson92 Jan 2, 2025
729db7f
remove debug code
samueljackson92 Jan 2, 2025
d99ae3f
Add support for writing metadatabase
samueljackson92 Jan 2, 2025
868b043
Fix ruff
samueljackson92 Jan 2, 2025
6ad7669
Fix rank,shape,dims
samueljackson92 Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
source venv/bin/activate
uv pip install -r requirements.txt
uv pip install --upgrade --force-reinstall "numpy<2.0"
uv pip install -e ".[dev]"
- name: Run tests
run: |
Expand Down
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,13 @@ Update pip and install required packages:

```sh
python -m pip install -U pip
python -m pip install git+ssh://git@git.ccfe.ac.uk/MAST-U/mastcodes.git@release/1.3.10#subdirectory=uda/python
python -m pip install -e .
```

The final step to installation is to have mastcodes:
We must also source the SSL certificate information by running the following command. Without this UDA cannot connect to the UKAEA network.

```sh
git clone git@git.ccfe.ac.uk:MAST-U/mastcodes.git
cd mastcodes
```

Edit `uda/python/setup.py` and change the "version" to 1.3.9.

```sh
python -m pip install uda/python
cd ..
source ~/rds/rds-ukaea-ap002-mOlK9qn0PlQ/fairmast/uda-ssl.sh
```

Expand Down
5 changes: 0 additions & 5 deletions mappings/mast/custom_units.txt

This file was deleted.

34 changes: 23 additions & 11 deletions mappings/mast/dimensions.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"abm/i-bol": {
"chord": "dim_0"
},
"abm/v-bol": {
"chord": "dim_0"
},
"abm/r_tco_emis": {
"dim_0": "chord"
},
"abm/channel_status": {"dim_0": "chord"},
"abm/channel_type": {"dim_0": "chord"},
"abm/gain": {"dim_0": "chord"},
"abm/km": {"dim_0": "chord"},
"abm/phi_chords": {"dim_0": "chord"},
"abm/phi_slits": {"dim_0": "chord"},
"abm/prad_pol": {"dim_0": "chord"},
"abm/r_chords": {"dim_0": "chord"},
"abm/r_slits": {"dim_0": "chord"},
"abm/rbm": {"dim_0": "chord"},
"abm/taum": {"dim_0": "chord"},
"abm/z_chords": {"dim_0": "chord"},
"abm/z_slits": {"dim_0": "chord"},

"act/c_pla_cutoff": {
"dim_0": "n_pla"
Expand Down Expand Up @@ -1876,6 +1880,10 @@
"t": "time",
"radialindex": "radial_index"
},
"ayc/instrument_intensity": {
"time": "instrument_time",
"t": "instrument_time"
},
"ayc/instrument_dr": {
"time": "instrument_time",
"t": "instrument_time",
Expand Down Expand Up @@ -1980,8 +1988,12 @@
"radialindex": "radial_index",
"spectralindex": "spectral_index"
},
"aye/instrument_intensity": {
"time": "instrument_time",
"t": "instrument_time"
},
"aye/instrument_dr": {
"t": "time",
"t": "instrument_time",
"radialindex": "radial_index"
},
"aye/interferometer_corr": {
Expand All @@ -2006,7 +2018,7 @@
"radialindex": "radial_index"
},
"aye/segment_number": {
"t": "time"
"t": "time_segment"
},
"aye/spectra": {
"t": "time",
Expand Down
5 changes: 0 additions & 5 deletions mappings/mast/globals.json

This file was deleted.

38 changes: 38 additions & 0 deletions mappings/mast/groups.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"abm": {"name": "bolometer", "imas": "bolometer"},
"act": {"name": "charge_exchange", "imas": "charge_exchange"},
"aga": {"name": "gas_injection", "imas": "gas_injection"},
"ahx": {"name": "hard_x_rays", "imas": "hard_x_rays"},
"ait": {"name": "camera_ir", "imas": "camera_ir"},
"alp": {"name": "langmuir_probes", "imas": "langmuir_probes"},
"ama": {"name": "magnetics_a", "imas": "magnetics"},
"amb": {"name": "magnetics_b", "imas": "magnetics"},
"amc": {"name": "magnetics_c", "imas": "magnetics"},
"anb": {"name": "nbi", "imas": "nbi"},
"ane": {"name": "interferometer", "imas": "interferometer"},
"anu": {"name": "neutron_diagnostic", "imas": "neutron_diagnostic"},
"arp": {"name": "reciprocating_probe"},
"asm": {"name": "magnetics_saddle", "imas": "magnetics"},
"atm": {"name": "thomson_scattering", "imas": "thomson_scattering"},
"ayc": {"name": "thomson_scattering", "imas": "thomson_scattering"},
"aye": {"name": "thomson_scattering_edge", "imas": "thomson_scattering"},
"efm": {"name": "equilibrium", "imas": "equilibrium"},
"esm": {"name": "equilibrium_summary", "imas": "equilibrium"},
"rba": {"name": "camera_visible_a", "imas": "camera_visible"},
"rbb": {"name": "camera_visible_b", "imas": "camera_visible"},
"rbc": {"name": "camera_visible_c", "imas": "camera_visible"},
"rco": {"name": "camera_visible_color", "imas": "camera_visible"},
"rgb": {"name": "camera_visible_bremsstrahlung_a", "imas": "camera_visible"},
"rgc": {"name": "camera_visible_bremsstrahlung_b", "imas": "camera_visible"},
"rir": {"name": "camera_ir", "imas": "camera_ir"},
"rzz": {"name": "camera_visible_bremsstrahlung_zebra", "imas": "camera_visible"},
"xbt": {"name": "bes"},
"xdc": {"name": "pulse_schedule", "imas": "pulse_schedule"},
"xim": {"name": "spectrometer_visible", "imas": "spectrometer_visible"},
"xma": {"name": "magnetics_raw_a", "imas": "magnetics"},
"xmb": {"name": "magnetics_raw_b", "imas": "magnetics"},
"xmc": {"name": "magnetics_raw_c", "imas": "magnetics"},
"xmo": {"name": "magnetics_omaha", "imas": "magnetics"},
"xms": {"name": "mse", "imas": "mse"},
"xsx": {"name": "soft_x_rays", "imas": "soft_x_rays"}
}
Loading
Loading