ProjectTorreyPines / GGDUtils.jl

Package holding utilities for Generalized Grid Description (GGD) objects in IMAS datastructure. Primary goals are interpolation and core profile extrapolation.
https://projecttorreypines.github.io/GGDUtils.jl/stable
Apache License 2.0
2 stars 0 forks source link

Include subset #s in error messages about subsets #66

Closed eldond closed 1 month ago

eldond commented 2 months ago

Make subset-related error messages in subset_tools more informative.

eldond commented 2 months ago

OOHHHH, it will report a problem with the from_subset if the data are totally missing. We have to detect that better, I think. That is, if I load in a data set that has empty density such that dd2.edge_profiles.ggd[1].electrons.density has length 0 and trying to index [1] on it triggers an error, then GGDUtils will throw an error about "from_subset not represented in the property yet". This is misleading because there is no property; nothing is represented. Some of our sample data were compressed by deleting some of the fields to make files smaller. Testing with these leads to this kind of error. So I need to take this farther by adding a check to see if the property is totally empty and reporting that, which would be more meaningful.

eldond commented 2 months ago

Motivated by problems found during https://github.com/ProjectTorreyPines/SynthDiag.jl/pull/35

eldond commented 1 month ago

@anchal-physics ready