NAPI unit conversions

Ray Osborn ROsborn at anl.gov
Mon Aug 11 06: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

------------------------------------------------------
Dr Ray Osborn                  Tel: +1 (630) 252-9011
Materials Science Division     Fax: +1 (630) 252-7777
Argonne National Laboratory    E-mail: ROsborn at anl.gov
Argonne, IL 60439-4845


--------------------------------------------------------------------------------
Return-Path: <ROsborn at anl.gov>
Received: from dns2.anl.gov by ipns.pns.anl.gov (MX V4.2 AXP) with SMTP; Mon,
          11 Aug 1997 00:09:02 CST
Received: from osborn.msd.anl.gov (osborn.msd.anl.gov [146.139.244.39]) by
          dns2.anl.gov (8.6.11/8.6.11) with ESMTP id AAA02610 for
          <ROsborn at anl.gov>; Mon, 11 Aug 1997 00:09:00 -0500
Received: from dns2.anl.gov (146.139.254.3) by osborn.msd.anl.gov with SMTP
          (Eudora Internet Mail Server 1.1.2); Mon, 11 Aug 1997 00:08:39 -0500
Received: from osborn.msd.anl.gov (osborn.msd.anl.gov [146.139.244.39]) by
          dns2.anl.gov (8.6.11/8.6.11) with ESMTP id AAA02604 for
          <NAPI at anl.gov>; Mon, 11 Aug 1997 00:08:37 -0500
Received: from [146.139.244.39] by osborn.msd.anl.gov with ESMTP (Eudora
          Internet Mail Server 1.1.2); Mon, 11 Aug 1997 00:08:26 -0500
Message-ID: <l03102801b0144b0540c0@[146.139.244.39]>



More information about the NeXus-developers mailing list