NAPI unit conversions

Ray Osborn ROsborn at anl.gov
Mon Aug 11 00:08:13 BST 1997


If you recall, we suggested at SoftNeSS'96 that if we put the units as an argument 
in NXgetdata, we could get the API to do an automatic unit conversion from the 
stored units to the requested units.  This suggests that we should also put the 
units as an argument in NXputdata, to encourage them to be stored properly.  I know 
that I argued earlier that we should not overload the user with required 
attributes, but I think that it would be a good idea to make the units a special 
attribute that should always be specified if available.

I would like to propose therefore that the NXputdata helper routine be something 
like

NXstatus NXputdata (NXhandle file_id, char *name, int type, int rank, int dims[], 
void *data, char *units)

which would call NXmakedata, NXopendata and NXputattr.  I think that this would 
remove 90% of all attribute calls.

NXgetdata would have to be amended to include an extra argument as well.

Any thoughts on this?

Ray



More information about the NeXus-developers mailing list