## GILDAS_NULL

The subroutine GILDAS_NULL is the principal initialization routine for GILDAS data structures. No access to the Gildas derived type elements should be done before calling this routine, as some elements are dangling pointers. Subroutine GILDAS_ERROR will return an error and issue a message if the gildas data structure has not been initialized. 7

    interface
      subroutine gildas_null(hx, type)
        use image_def
        !---------------------------------------------------------------------
        ! @ public
        ! GDF API
        !   Initialize a Gildas structure and reset its content
        !   TYPE can be: 'IMAGE' (default), 'TABLE', 'UVT', 'TUV', 'VOTABLE'
        !---------------------------------------------------------------------
        type(gildas), intent(out), target :: hx ! Gildas structure
        character(len=*), intent(in), optional :: type
      end subroutine gildas_null
    end interface

It has an optional argument named type, which indicates which type of Gildas data structure is used. The default is 'IMAGE'.

Calling GILDAS_NULL(h, type = 'UVT') will set appropriate defaults for UV data set in natural order, while GILDAS_NULL(h, type = 'TUV') should be used for the transposed order. Existing pointers are nullified, and then associated to their appropriate target.