# NX__define.pro

At present this program is installed in the /usr/local/epics/extensions/bin/$HOST_ARCH directory. This program is written in IDL 5.1 object programming language . It provides the IDL user conveninent methods of accessing NX HDF data set.

In order to access NX object from other IDL program, a user has to make sure that the following environment variable is set before invoking IDL :

         setenv EPICS_EXTENSIONS  /usr/local/epics/extensions

         setenv IDL_STARTUP /usr/local/epics/extensions/bin/$HOST_ARCH/viewer_startup.pro

and make sure including the directory /usr/local/epics/extensions/bin/$HOST_ARCH in his/her IDL search path.

During an IDL session to access NX object class by entering :

         .run NX__define

For an example to create a 'NX' object with variable name as v, where the NX HDF data is saved in the file '1.hdf':

         v = obj_new('NX',file='1.hdf')

To view the HDF file summary:

         v->print

# List of Routines

- NX::CLOSE
- NX::DEBUG
- NX::DUMPSDS
- NX::DUMPVD
- NX::DUMPVG
- NX::FINDSDS
- NX::FINDVD
- NX::FINDVG
- NX::GETATTR
- NX::GETFID
- NX::GETSDS
- NX::GETVD
- NX::GETVG
- NX::GLOBAL_ATTRIBUTE
- NX::LINKVG
- NX::OPEN
- NX::PUTATTR
- NX::PUTFID
- NX::PUTSDS
- NX::PUTVG
- NX::SDS
- NX::SDSREF
- NX::SDSVGNAME
- NX::USER
- NX::VD
- NX::VG
- NX::VGVD

# Routine Descriptions

## NX::CLOSE

[Next Routine] [List of Routines]

     NAME:
    	NX::CLOSE

     PURPOSE:
           This method closes the currently opened HDF file by the NX object.

     CALLING SEQUENCE:
           Obj->[NX::]Close

     ARGUMENTS:
           None.

     KEYWORDS:
           None.

     EXAMPLE:
         Close the HDF file opened by the NX object v.

             v->Close

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::DEBUG

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::DEBUG

     PURPOSE:
           This method turns on/off the display of the various NX methods.

     CALLING SEQUENCE:
           Obj->[NX::]Debug, On

     INPUT:
         On:        Specifies display output on or off. On defaults to 1 implies
                    debug is on. If 0 no display of the output will be shown.

     KEYWORDS:
         NOWIN:     If specified, only the ASCII files will be created but the
                    xdisplayfile window will not be shown.

     EXAMPLE:
         Turn the display of method output on for the NX HDF object v.

             v->Debug,1

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::DUMPSDS

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::DUMPSDS

     PURPOSE:
           This method dump all the SDS data sets found in a NX HDF file.

     CALLING SEQUENCE:
           Obj->[NX::]DumpSDS [,Sds_ref] [,Output] [,File=file] [,Help=help]

     INPUT:
         None.

     OUTPUT:
         Sds_ref    Returns the SDS reference ID array
         Output     Returns the output info strings

     KEYWORDS:
         FILE:      Specifies another HDF file instead of the default file sepecified
                    by the NX object
         HELP:      If specified, gives this on-line help
         NOWIN:     If specified, no info window pops up

     EXAMPLE:
         Example 1 lists all the SDS data sets found in the opened NX HDF object v

             v->dumpSDS

         Example 2 lists all the SDS data sets in the opened NX HDF object v

             v->dumpSDS,file='old.hdf'

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::DUMPVD

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::DumpVD

     PURPOSE:
           This method dumps all the Vdata found in the HDF file.

     CALLING SEQUENCE:
           Obj->[NX::]DumpVD [,Vdata_ids, File=file, Output=str, Help=help]

     OUTPUT:
         Vdata_ids:     Returns the Vdata reference array found for the HDF file

     KEYWORDS:
         File:      If specified, a new HDF file will be used.
         Output:    If specified, the output strings are returned.
         Nowin:     If specified, the xdisplayfile window will not be shown.
         Help:      If specified, it provides this on-line help message.

     EXAMPLE:
         Example 1 dumps all the vdata found in the opened NX HDF object v and
         returns the corresponding Vdata reference id array.

             v->DumpVd,vdata_ids

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::DUMPVG

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::DumpVG

     PURPOSE:
           This method dumps all the VG found in a HDF file.

     CALLI:  SEQUENCE:
          : bj->[NX::]DumpVG [,N1,N2] [,Vgroup_ids] [,File=file] [,/DATA]
                        [,/ENTRY] [,/HELP]

     INPUT:
      Vgroup_ids: Variable returns the group reference array for the HDF file.

     KEYWORDS:
       FILE:    Specifies a new HDF file instead of using the current opened NX file
      /ENTRY:   Dumps the subgroup entries in the Vgroup
      /DATA:    Dumps the subgroup entry and data as well
      /HELP:    Echo this on-line command syntax

     EXAMPLE:
         Example 1 dump the VGgoup name and class defined in the NX HDF object v.
         The object variable v only need to be defined once in whole IDL session.

             v->DumpVG

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::FINDSDS

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::FINDSDS

     PURPOSE:
           This method searches for the SDS data set with  the user specified
           SDS name. It returns the corresponding seq and ref number found.

     CALLING SEQUENCE:
           Obj->[NX::]FindSDS,sds_name [,Seq, Ref, Data] [,Type=type]
                       [,Ndims=ndims] [,Dims=dims] [,Output=output]
                       [,Nowin=nowin]

     INPUT:
         sds_name:  specifies the SDS data name to be searched for

     OUTPUT:
         Seq:       returns the zero based sequence index number of the SDS
         Ref:       returns the corresponding HDF reference number of the SDS
         Data:      returns the SDS data array

     KEYWORDS:
         Type:      If specified, it returns the SDS data type
         Ndims:     If specified, it returns the SDS data ndims
         Dims:      If specified, it returns the SDS data dims
         Output:    If specified, it returns the output string
         Nowin:     If specified, no output window pops up

     EXAMPLE:
         Example 1 find the info about the SDS data set with 'location' as name
         from the HDF file '1.hdf'

             v = obj_new('NX',file='1.hdf')
             v->FindSDS,'location'

         Example 2 returns the found SDS seq and ref number without popping up
         the info window

             v->FindSDS,'location',seq,ref,/nowin

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::FINDVD

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::FindVD

     PURPOSE:
           This method finds the matched Vdata fro a given vdata name string.

     CALLING SEQUENCE:
           Obj->[NX::]FindVD, Name [,Select]

     INPUT:
         Name:      Specifies the name string of the desired vdata name.

         Select:    Specifies the selected seqno of the matched Vdata name

     EXAMPLE:
         Example 1 lists all the vdata name defined in a NX HDF object v

             v->FindVD,'*'

         Example 2 find the vdata set with name of 'owner_name' from the HDF file

             v->FindVD,'owner_name'

         Example 2 find the vdata set with name of 'owner_name' from the HDF file
         and select the 2nd set from the matched list.

             v->FindVD,'owner_name',2

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::FINDVG

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::FINDVG

     PURPOSE:
           This method searches and prints out all the VGroups found which
           satisfy the search condition. The search condition can either
           by group name / group classname / group name and classname.
           This method can return the group sequence and groupid reference
           arrays.

     CALLING SEQUENCE:
           Obj->[NX::]FindVg, Seq, Gid, Name=name, Class=class, Output=output

     OUTPUT:
         Seq:       Returns the array of matched group sequence id
         Gid:       Returns the array of matched group reference id

     KEYWORDS:
         Name:      Specifies the group name to search for
         Class:     Specifies the class name to search for
         Output:    If specified, it returns the output strings. If debug option
                    is set the output display will be automatically popped up.
         Nowin:     Suppresse the output window

     RESTRICTIOM
         The NX HDF file will be closed and re-opened by this method. This will
         gaurantee that the newly added groups will be found too.

     EXAMPLE:
         Example 1 finds the group seq numbers where group name contains the search
         string 'reactor'. Variable V is a previously defined NX HDF object.

             v->FindVg, name='reactor', seq, ref

         Example 2 finds the NX group seq numbers where group name contains the search
         string 'reactor' and class name contains the search string 'NXreactor'

             v->FindVg, name='reactor', class='NXreactor', seq, ref

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::GETATTR

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::GETATTR

     PURPOSE:
           This method allows the user to get global or SDS attribute data for
           a specified attribute name from the NX HDF object.

     CALLING SEQUENCE:
           Obj->[NX::]Getattr, Name, Data [,S_id=s_id, Output=output]

     INPUT:
         Name:      Attribute name to search for

     OUTPUT:
         Data:      Returns the corresponding global attribute data

     KEYWORDS:
         S_ID:      Specifies the SD interface ID as returned by HDF_SD_START
                    for global, or HDF_SD_SELECT/HDF_SD_CREATE for SDS
         Output:    Detailed info about the found attribute.
         Nowin:     If specified, no info window pops up

     EXAMPLE:
         Example 1 finds the global attribute 'owner_name' for the NX object v.
         The NX object v needs to be defined for a HDF file if it is not
         defined yet in the IDL session.

             v->Getattr,'owner_name',data

         Example 2 finds the global attribute 'owner_name' using the S_id keyword:

    	  sd_id = hdf_sd_start(filename)
             v->Getattr,'owner_name',data,S_id=sd_id

         Example 3 finds the attribute data of the third set of SDS with
         attribute name 'primary' using the S_id keyword:

    	  sd_id = hdf_sd_start(filename)
             sds_id = hdf_sd_select(sd_id,2)
             v->Getattr,'primary',data, S_id=sds_id

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::GETFID

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::GETFID

     PURPOSE:
           This method allows the user to get string array of file annotations from
           the given NX HDF object or from a specified HDF file.

     CALLING SEQUENCE:
           Obj->[NX::]Getfid, Fids [,File=file]

     OUTPUT:
         Fids:      Variable returns the file annotation string array.

     KEYWORDS:
         File:     If specified, the given HDF file name override the default
                   NX object file.
         Nowin:    If specified, the popup window is suppressed.

     EXAMPLE:
             Obtains the file annotation for the NX object v.

             v->Getfid,fids

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::GETSDS

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::GETSDS

     PURPOSE:
           This method returns SDS data, type, ndims, dims with known sds_name.

     CALLING SEQUENCE:
           Obj->[NX::]GetSDS, Sds_name, Data [,Type=type] [,Ndims=ndims]
                                [,Dims=dims] [,/NOWIN]

     INPUT:
         Sds_name:   Specifies the SDS data set name to search for

     OUTPUT:
         Data:       Returns the SDS data array

     KEYWORDS:
         Type:       Returns the type of the SDS data
         Ndims:      Returns the ndims of the SDS data
         Dims:       Returns the dims of the SDS data
         Nowin:      If specified, no info window pops up.

     EXAMPLE:
         Example 1 finds the SDS data set with name as 'location' where v is the
         opened NX HDF object.

             v->GetSDS,'location',data,type=ty

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::GETVD

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::GETVD

     PURPOSE:
           For a given Vdata reference id this method gives the corresponding
           VData information.

     CALLING SEQUENCE:
           Obj->[NX::]GetVD, Id [,nm] [,data] [Fields=fields, Nrecords=nrecords,
                         Output=output]

     INPUT:
         Id:        Vdata reference id in a HDF file.

     OUTPUT:
         Nm:        If specified, it returns the Vdata name
         Data:      If specified, it returns the Vdata data array

     KEYWORDS:
         Fields:     If specified, it returns the field names for the Vdata
         Nrecords:   It specifies the number of records to be read
         Output:     If specified, it returns the info output strings.
         Title:      If specified, it sets the GetVD info window name.
         Nowin:      If specified, no GetVD info window pops up.

     EXAMPLE:
         Example 1 finds the info of the first VData of the NX HDF object v

             v->VgVd,gid,did
             v->GetVD,did(0)

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::GETVG

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::GETVG

     PURPOSE:
           This method searches for the VGroup by either matching the user
           specified HDF group reference id or matching the user specified group
           name and/or classname.

     CALLING SEQUENCE:
           Obj->[NX::]GetVG, {Id | Name=name, Class=class} [,/Nowin,Output=output,
                     Gid=gid,Tags,Refs,Ent_name,Ent_type ]

     INPUT:
         Id:        Specifies the group reference id of the interested group

     OUTPUT:
         Tags:      Returns sub-group entries tags array
         Refs:      Returns sub-group entries refs array
         Ent_name:  Returns sub-group entries name array
         Ent_type:  Returns sub-group entries type array

     KEYWORDS:
         Name:      Specifies the group name to search for
         Class:     Specifies the group classname to search for
         Gid:       Returns the group id array of the HDF file if matching by
                    group name is chosen
         Output:    Returns the info strings of matched groups
         NOWIN:     If specified, no info window pops up

     EXAMPLE:
         Example 1 shows the first group of the HDF file '1.hdf'

             v = obj_new('NX',file='1.hdf')
             v->VgVd,gid,did
             v->GetVg,gid(0)

         Example 2 shows all the groups which has group name starts with 'reactor'

             v->GetVg, name='reactor'

         Example 3 shows the group with known group name 'reactor1' and returns
         the group reference id array for the HDF file.

             v->GetVg, name='reactor1', class='reactor1',gid=gid

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::GLOBAL_ATTRIBUTE

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::GLOBAL_ATTRIBUTE

     PURPOSE:
           This method writes a new set of global attributes: file_name,
           version, owner_name, owner_mail, owner_email,owner_phone,
           owner_fax, file_history, experiment_description for the HDF
           file. If the HDF file is created by the NX object initialization
           which automatically calls this method.

     CALLING SEQUENCE:
           Obj->[NX::]Global_attribute

     ARGUMENTS:
           None.

     KEYWORDS:
           User_name        Updates the user name if specified.
           User_mail        Updates the user mail address if specified.
           User_email       Updates the user email address if specified.
           User_phone       Updates the user phone number if specified.
           User_fax         Updates the user fax number if specified.
           User_history     Updates the file history if specified.
           User_desc        Updates file description if specified.

     RESTRICTION
         The total number of lines of description can not exceeds 100.
         Every set of global attribute includes owner's name, mail,email,
         phone, fax, history, and description.

     EXAMPLE:
         The NX object v needs to be defined for a HDF file if it is not
         defined yet in the IDL session.

             descs = ['line1 ...','line2...', ...]
             v->[NX::]Global_attribute,user_desc=descs,user_name='...'

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::LINKVG

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::LINKVG

     PURPOSE:
           This method links a child group to a parent group for a NX HDF file.

     CALLING SEQUENCE:
           Obj->[NX::]LinkVG, Parent_name, Child_name [,C_index=c_index]
                      [,P_index=p_index] [,gid1 [,gid2]] [,/NOWIN]

     INPUT:
         Parent_name: Parent group name
         Child_name:  Child group name to be linked with the parent group

     OUTPUT:
         gid1:        Returns parent group reference id
         gid2:        Returns child group reference id
     KEYWORDS:
         P_INDEX:     Specifies the desired parent index of matched parent groups
                      If not specified, it defaults to zero.
         C_INDEX:     Specifies the desired child index of matched sub-groups
                      If not specified, it defaults to zero.
         NOWIN:       If specified, no info window pops up

     EXAMPLE:
         Example 1 links the first matched 'sub-group1' to first 'default'
         parent group.

             v->LinkVG,'default','sub-group1'

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::OPEN

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::OPEN

     PURPOSE:
           This method opens any existing HDF or creates a new NX HDF file.

     CALLING SEQUENCE:
           Obj->[NX::]Open, File [, Gname=gname] [,Gclass=gclass]
                [,Program_name=program_name] [,Location=location]
                [,User_name=user_name] [,User_email=user_email]
                [,User_fax=user_fax] [,User_phone=user_phone ]

     INPUT:
         File:      Specifies the HDF file name to be opened.

     KEYWORDS:
         Following keywords are used in NX HDF file creation.

         Gname:      Specifies entry group name, default to 'entry_default'
         Gclass:     Specifies entry group class name, default to 'NXdefault'
         Program_name: HDF file associated with program name
         Location:   Experimental location, default to 'APS'
         User_name:  Owner name, from the unix system malias
         User_email: Owner email address, from the unix system malias
         User_fax:   Owner fax number
         User_phone: Owner phone number

     EXAMPLE:
         Example 1 creates the HDF file '1.hdf' with the default settings if
         file does not exist yet.

             v->Open,'1.hdf'

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::PUTATTR

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::PUTATTR

     PURPOSE:
           This method writes the global or SDS data attibute.

     CALLING SEQUENCE:
           Obj->[NX::]PutAttr, Attr_name, Attr_data [,Sds_name=sds_name]
                        [,Output=output]

     INPUT:
         Attr_name:     Specifies the attribute name to be written
         Attr_data:     Specifies the attribute data to be written

     KEYWORDS:
         S_ID:          Specifies the SD interface ID as returned by HDF_SD_START
                        for global attribute, or HDF_SD_SELECT/HDF_SD_CREATE for
                        SDS attribute. If S_ID is given, the SDS_name is ignored.
         SDS_name:      Specifies the SDS set to be tagged, if not specified then
                        writing the global attribute is assumed
         Output:        If specified, it returns the output strings
         Nowin:         If specified, no info window pops up

     EXAMPLE:
         Find the SDS data set name 'temperature', then tag with the attr_name
         'primary' and attr_data of 1 for the HDF NX object v.
         The NX object v needs to be defined for a HDF file if it is not
         defined yet in the IDL session.

             attr_name = 'primary'
             attr_data = 1
             v->PutAttr,attr_name,attr_data,sds_name='temperature'

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::PUTFID

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::PUTFID

     PURPOSE:
           This method allows the user to add string array of file annotations to a
           HDF file.

     CALLING SEQUENCE:
           Obj->[NX::]Putfid, Fids [,File=file]

     INPUt:
         Fids:      File annotation string array to be added to an NX HDF file.

     KEYWORDS:
         FILE:      Specifies the destination HDF file instead of the default
                    NX object.

     EXAMPLE:
         The NX object v needs to be defined for a HDF file if it is not
         defined yet in the IDL session.

    	  fids = ['This is the file annotation array.', $
                     'More lines of text....']
             v->Putfid,fids

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::PUTSDS

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::PUTSDS

     PURPOSE:
           This method allows the user to add a SDS data with few possible
           predefined data attributes. The destination file can be default NX
           object file or any valid HDF file specified by the keyword File.

     CALLING SEQUENCE:
           Obj->[NX::]PutSDS, Data,index,ref, Name=name, File=file, Range=range,
                       Unit=unit, Format=format, Coordsys=coordsys, Label=label,
                       Caldata=caldata, Fill=fill

     INPUT:
         Data:      Scientific data set can be any of byte, short, long, float,
                    double array.

     OUTPUT:
         Index:     Created SD dataset index number
         Ref:       SD reference number

     KEYWORDS:
         Sid:       Specifies the opened SD interface ID for writing
         Name:      Specifies the name attribute for SD data
         File:      Specifies destination file, defaults to NX object file
         Range:     Scientific data range [min,max]
         Unit:      String
         Format:    String
         Coordsys:  String
         Label:     String
         Caldata:   Calibration array
         Fill:      Fill data

     RESTRICTION:
         If no sid interface is used, the proper SD interface startup and closing
         is automatically taking cared by putSDS.

         If sid interface is used a user has to open the file with HDF_SD_START
         with /RDWR option before calling putSDS. At the end of all putSDS, a
         user has to explicitly close the SD interface by calling the HDF_SD_END.

     EXAMPLE:
         Example 1 write the image array to the HDF file opened by the NX object v.

    	  image=....
             v->PutSDS,image,name='Image_1'

         Example 2 write few image arrays to the HDF file opened by the NX object v
         through using the SD interface ID.

             sd_id = HDF_SD_START(self.file,/RDWR)
             v->PutSDS,Sid=sd_id,image1,name='Image_1'
             v->PutSDS,Sid=sd_id,image2,name='Image_2'
             v->PutSDS,Sid=sd_id,image3,name='Image_3'
             HDF_SD_END,sd_id

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::PUTVG

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::PUTVG

     PURPOSE:
           This method allows the user to create a new Vgroup with user specified
           group name and group classname.

           If the parent name is specified the newly created group will be added
           to the parent group.

     CALLING SEQUENCE:
           Obj->[NX::]PutVg, Name=name, Class=class, File=file

     ARGUMENTS:
         None.

     KEYWORDS:
         Name:      Specifies the Vgroup name.
         Class:     Specifies the Vgroup classname.
         Parent:    Specifies the parent Vgroup name.
         File:      Optional, specifies the destination HDF file.

     RESTRICTION
         The user is responsible for the HDF integrity for the group added.
         PutVg method does not check for the uniqeness of group name and
         group classname, the user is reqposible for it.

     EXAMPLE:
         Example 1 creates a group with group name='reactor', group classname
         'NXreactor NIST'. Variable v is an opened NX HDF object.

             v->PutVg, Name='reactor', Class='NXreactor'

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::SDS

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::SDS

     PURPOSE:
           This method reads the SDS data for a specified SD sequence number for a
           HDF file.

     CALLING SEQUENCE:
           Obj->[NX::]SDS, Seq, Data [,Name=name] [,Dims=dims] [,Format=format]
                       [,Label=label] [,Natts=natts] [,Ndims=ndims] [,Type=type]
                       [,Range=range] [,Caldata=caldata] [,Coordsys=coordsys]
                       [,Unit=unit] [,Output=output] [,/NOWIN]

     INPUT:
         Seq:      zero based seq number for SDS data set

     OUTPUT:
         Data:     returns the SDS data obtained

     KEYWORDS:
         NAME:     returns the name attribute
         DIMS:     returns dims array
         FORMAT:   returns format attribute
         LABEL:    returns lagel attribute
         NATTS:    returns number of attributes
         NDIMS:    returns number of dimensions
         TYPE:     returns data type
         RANGE:    returns range attribute
         CALDATA:  returns caldata attribute
         COORDSYS: returns coordsysattribute
         UNIT:     returns unit attribute
         OUTPUT:   returns output string
         NOWIN:    If specified, no info window pops up.

     EXAMPLE:
         Example 1 get the first set of SDS data from the opened NX HDF object v
         without popping up info window.

             v->SDS,0,data,/nowin

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::SDSREF

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::SDSREF

     PURPOSE:
           This method reads the SDS data for a specified SD reference
           number for a HDF file.

     CALLING SEQUENCE:
           Obj->[NX::]SDSREF, Seq, Data [,Name=name] [,Dims=dims] [,Format=format]
                       [,Label=label] [,Natts=natts] [,Ndims=ndims] [,Type=type]
                       [,Range=range] [,Caldata=caldata] [,Coordsys=coordsys]
                       [,Unit=unit] [,Output=output] [,/NOWIN]

     INPUT:
         Seq:      HDF reference number for the SDS data set

     OUTPUT:
         Data:     returns the SDS data obtained

     KEYWORDS:
         NAME:     returns the name attribute
         DIMS:     returns dims array
         FORMAT:   returns format attribute
         LABEL:    returns lagel attribute
         NATTS:    returns number of attributes
         NDIMS:    returns number of dimensions
         TYPE:     returns data type
         RANGE:    returns range attribute
         CALDATA:  returns caldata attribute
         COORDSYS: returns coordsysattribute
         UNIT:     returns unit attribute
         OUTPUT:   returns output string
         NOWIN:    If specified, no info window pops up.

     EXAMPLE:
         Example 1 get SDS data set with  reference of 10 the opened NX HDF object v
         without popping up info window.

             v->SDSREF,10,data,/nowin

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::SDSVGNAME

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::SDSVGname

     PURPOSE:
           This method find the vgroup names corresponding to SDS data sets.
           The returned array consists of SDSname suffix with ': ' and Vgroup
           name which it below to.

     CALLING SEQUENCE:
           Obj->[NX::]SDSVGname,names[,Output=output] [,/NOWIN]

     INPUT:
         None.

     OUTPUT:
         names:     returns the SDS_VGroup name string

     KEYWORDS:
         GCLASS:   Specifies the string of group class to be searched .
                   If specified, only the matched class will be returned.
         OUTPUT:   Returns output strings.
         NOWIN:    If specified, no info window pops up.

     EXAMPLE:
         Example 1 finds the combined vgroup name string of SDS data set

             v->SDSVGname,names,/nowin

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::USER

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::USER

     PURPOSE:
           This method allows the NX user to get the user_id, user_name,
           and user_email from the Unix operating system.

     CALLING SEQUENCE:
           Obj->[NX::]User [,User_id, User_name, User_email]

     OUTPUT:
         User_ID:      returns the user_id based on the system mailalias file
         User_name:    returns the user_name corresponding to user_id
         User_email:   returns the user_email corresponding to user_id

     KEYWORDS:
         None.

     RESTRICTION:
         The method uses the Unix command malias and the /home/oxygen/etc/mailalias
         file automaically figuring out the user_id, user_name, and user_email.
         For non Unix system it may need modification

     EXAMPLE:
         The NX object v only need to be defined once for a given HDF file in
         whole IDL session.

             v = obj_new('NX',file='1.hdf')
             v->User,user_id,user_name,user_email

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, May 4, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::VD

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::VD

     PURPOSE:
           For a given Vdata seqence number this method gives the corresponding
           VData information.

     CALLING SEQUENCE:
           Obj->[NX::]VD, Seqno [,Nm] [,Data] [,Ref=ref] [,Title=title]
                     [,Nowin=nowin] [,Output=output]

     INPUT:
         Seqno:      Vdata sequence number in a HDF file.

     OUTPUT:
         Nm:        If specified, it returns the Vdata name
         Data:      If specified, it returns the Vdata data array

     KEYWORDS:
         Ref:        If specified, it returns the Vdata reference id
         Output:     If specified, returns the info output strings.
         Title:      If specified, resets the info window title.
         Nowin:      If specified, no VD info window pops up.

     EXAMPLE:
         Example 1 finds the info of the first VData of the NX HDF object v

             v->VD,0

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::VG

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
    	NX::VG

     PURPOSE:
           This method gives the VGroup info for a user specified zero based
           group seq number in the NX HDF object.

     CALLING SEQUENCE:
           Obj->[NX::]VG, Seq [,Tags [,Refs]] [,Output=output][,Sdsdata=sdsdata]

     INPUT:
         Seq:       Specifies the VGroup zero based seq number

     OUTPUT:
         Tags:      Returns the HDF tags of the entries in the VGroup
         Refs:      Returns the HDF refs of the entries in the VGroup
         Ent_name:  Returns the name of the entries in the VGroup
         Ent_type:  Returns the type of the entries in the VGroup
                    1 - Vgroup, 2 - VData, 3 - SDS data

     KEYWORDS:
         SDSDATA:   If specified, the subgoup SDS data will be displayed too
         Output:    If specified, output info strings are returned through this
                    keyword.
         Nowin:     If specified, the popup window is suppressed.

     EXAMPLE:
         Example 1 read the first VGroup from the NX HDF object v.

             v->VG,0

         Example 2 read the 7'th VGroup from the NX HDF object v and return the
         output info as str.

             v->VG,0,output=str

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)

## NX::VGVD

[Previous Routine] [List of Routines]

     NAME:
    	NX::VGVD

     PURPOSE:
           This method finds all the VGroup ids and VData ids for the specified
           NX HDF objects.

     CALLING SEQUENCE:
           Obj->[NX::]VgVd, Vgroup_ids, Vdata_ids, /help

     OUTPUT:
         Vgroup_ids:   Returns the Vgroup reference ids array
         Vdata_ids:    Returns the Vdata reference ids array

     KEYWORDS:
         Help:         Gives this on-line help

     EXAMPLE:
         Example 1 gets the Vgroup (gid) and Vdata (did) arrays for the HDF file '1.hdf'

             v = obj_new('NX',file='1.hdf')
             v->VgVd, gid, did

     MODIFICATION HISTORY:
     	Written by:	Ben-chin Cha, Jun 19, 1998.
    	xx-xx-xxxx      comment

(See NX__define.pro)