Using group attrs instead of groupname for values #13

Closed
opened 2023-02-05 15:28:09 +00:00 by markusro · 0 comments
Owner

In hdfreader.py:

The //create_node// method is collecting variable and value information through the HDF group name only. Maybe this could also be done by using the groups attributes, i.e. the DAMARIS information set by //set_description//.
All needed //set_description// attributes should be available anyway in order to create the group name in the DAMARIS result script the first place. Usually ... but maybe not always.

def create_node(self, node):
...
for lvl in xy.split('/'):
try:
var_name, var_value = lvl.split('=')
if var_name.strip() not in self.variables:
self.variables.append(var_name.strip())
except ValueError:
pass
dic[xy.split('/')[-1]] = ('Signal', v.ref)
...

In hdfreader.py: =========== The //create_node// method is collecting variable and value information through the HDF group name only. Maybe this could also be done by using the groups attributes, i.e. the DAMARIS information set by //set_description//. All needed //set_description// attributes should be available anyway in order to create the group name in the DAMARIS result script the first place. Usually ... but maybe not always. def create_node(self, node): ... for lvl in xy.split('/'): try: var_name, var_value = lvl.split('=') if var_name.strip() not in self.variables: self.variables.append(var_name.strip()) except ValueError: pass dic[xy.split('/')[-1]] = ('Signal', v.ref) ...
markusro added the
Reviewed/Won't Fix
label 2023-02-05 15:31:25 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: IPKM/nmreval#13
No description provided.