Keywords: sic-gdfv2

Next: GDF_READ_UVONLY_CODES Up: GDF API and programming Previous: GDF_READ_GILDAS Contents

## GDF_READ_UVDATASET

`subroutine gdf_read_uvdataset(huvin,huvou,nc,duvou,error)`

Subroutine `gdf_read_uvdaset` is a somewhat more elaborate entry point which performs the possible layout conversion.

    interface
      subroutine gdf_read_uvdataset(huvin,huvou,nc,duvou,error)
        use image_def
        use gio_image
        use gbl_message
        use gbl_format
        !---------------------------------------------------------------------
        ! @ public
        !       Read UV data and Associated parameters from a GILDAS UV
        !       structure and place it in the specified array
        !---------------------------------------------------------------------
        type(gildas), intent(inout) :: huvin     ! Input UV header (data file)
        type(gildas), intent(inout) :: huvou     ! Output UV header (program used)
        integer(kind=4), intent(in) :: nc(2)     ! Selected channels
        real(kind=4), intent(inout) :: duvou(huvou%gil%dim(1),huvou%gil%dim(2))  ! Data
        logical,      intent(out)   :: error     ! Flag
      end subroutine gdf_read_uvdataset
    end interface

`huvin` must contain the data file header, while `huvou` can have a different layout. Layout can differ in several ways: different `column_pointer` and / or `column_size` arrays, transposition order (i.e. we may have `huvou%gil%type_gdf = - huvin%gil%type_gdf`). Transposition is done on-the-fly if needed. The two headers must otherwise be conforming.

`nc(2)` indicate the channel range to be retrieved. This is performed by calling function `gdf_range(nc, huvin%gil%nchan)` (or on a local copy, as `nc` is `intent(in)` only).

If the destination requires information not present in the source, or vice versa, an error is raised and a status code returned in `huvou%status` TO BE CODED.... It is up to the caller to react accordingly.

The routine currently assumes only one polarization. Polarization handling still needs further debate.