gafusion / omas

Ordered Multidimensional Array Structure
http://gafusion.github.io/omas
MIT License
30 stars 14 forks source link

ODS Data Gets Lost During Load #228

Closed torrinba closed 10 months ago

torrinba commented 1 year ago

Once the machine mappings are all working, I don't have any problem dynamically viewing the systems with

ods_open=ODS()
ods_open.open('d3d',pulse)

This is not very useful when I want to save the data to a file though, since only the data which has been loaded gets saved by

ods_open.save(filename)

It seems like the better option for this is to use

ods_load=ODS()
ods_load.load('d3d',pulse)

This takes significantly longer and prints messages for all the diagnostic systems, as I would have expected. When I look at the data that has been loaded, however, much of it is missing problem Any idea what is going on here? Should I be doing this differently?

smithsp commented 1 year ago

@bechtt Can you check your original message? The two cases look identical to me.

torrinba commented 1 year ago

@bechtt Can you check your original message? The two cases look identical to me.

Good catch! I edited it

smithsp commented 1 year ago

Is it a matter of just loading the geometry (hardware) and not the data itself when using load?

torrinba commented 1 year ago

That could be what I am missing. I'm surprised it doesn't load the geometry for the gas_injection, coils, Thomson, or many other systems either though.

Is that the primary distinction between open and load? Is there a static option that can be passed to open so that it pulls everything in? Or an option to expand all branches when save is called?

orso82 commented 1 year ago

Try this:

ods=ODS().load("machine", "d3d", pulse=133221)
torrinba commented 1 year ago

I tried your suggestion @orso82. It looks the same as doing the load in 2 lines. The ods only has 5 systems populated

orso82 commented 1 year ago

are those five systems fully populated?

orso82 commented 1 year ago
list_of_mappings = machine_mappings('d3d', '', None)

should list all the things that the load function is going to load

torrinba commented 1 year ago

are those five systems fully populated?

Some of those 5 systems are only partially populated.

list_of_mappings = machine_mappings('d3d', '', None)

should list all the things that [he load function is going to load

I see 217 entries in there, which seem to correspond with everything I see when I dynamically open the ods, but most of those do no make it into the result from load

orso82 commented 1 year ago

There is a print statement saying what is getting fetched: https://github.com/gafusion/omas/blob/master/omas/omas_machine.py#L950 do you see all systems being printed or only five?

torrinba commented 1 year ago

All of the systems (probably 217 but I haven't counted) get printed/fetched by load

smithsp commented 1 year ago

@bechtt Was this not resolved?

torrinba commented 1 year ago

That's correct. ods.load('d3d', shot) still does not work. An alternative is to use ods.open('d3d', shot) followed by ods.paths(). This was enough to do what I needed but this issue should stay open until load is fixed.

smithsp commented 1 year ago

@orso82 I think you know best what is needed here.

github-actions[bot] commented 10 months ago

Stale issue message