LAUE INTEGRATED REFLECTION LISTS (LIRL)

INTRODUCTION

This file contains a series of routines concerned with the allocation and management of memory for lists of Laue reflection records containing integrated reflection data. These are used to collate data from integrations of single plates (using LDM based routines) and/or to collate integrated intensity data for scaling & normalisation.

The following sets of routines are available:

Creating and Writing 'LIRL' lists
Get Data from 'LIRL' Lists
Sort 'LIRL' Lists
Delete and Clear 'LIRL' Data
Routines for the Laue Scaling Module

CREATING AND WRITING 'LIRL' LISTS

Introduction

Routines are available to create new LIRL reflection lists, to add records to such lists and to modify data in such lists.

The following routines are available:

Allocate and initialise a reflections list - lirl_init
Add a reflection to a reflections list - lirl_addref
Update a reflection in a reflections list - lirl_putref
Set number of overload pixels - lirl_set_ovpix
Set reflection 'outlier' flag - lirl_set_outlier
Set reference intensity and sigma - lirl_set_refint
Update 'ksym' for a reflection - lirl_putksym
Pass symmetry matrices to LIRL routines - lirl_setsym

Allocate and initialise a reflections list - lirl_init

The routine lirl_init (lirlf_init) checks to see if a spare slot is available and, if so, allocates the memory for a new Laue integrated reflections list (LIPL) with an initial allocation of records. The routine returns an index (handle) to be used in all other routines for accessing that list.
 
Fortran call:
 
         CALL LIRLF_INIT  (INIT_ALLOC, INT_ALLOC, LIST_TYPE, 
        +                  ICOORD_TYPE, MINDX)
 
Parameters:
 
INIT_ALLOC   i  (R)  Initial allocation required (no. of reflection
                     records).
INC_ALLOC    i  (R)  No. of records by which to extend the 
                     reflections list each time an extension is 
                     required.
LIST_TYPE    i  (R)  = 0 Integrated spots list 
                     (others reserved for future expansion)
ICOORD_TYPE  i  (R)  Coordinate type flag 
                       =0 in mm from pattern centre (ideal)
                       =1 in mm from pattern centre (distortion 
                          corrected)
                       =2 in detector raster units
MINDX        i  (W)  Index for the allocated reflection list (>=0)
                     A negative return value indicates an error and
                     the value is the return code from the routine
                     lirl_init.
 
'C' call:
 
int lirl_init (int init_alloc, int inc_alloc, int list_type, int coord_type)
 
Parameters:
 
int init_alloc;      No. of records to be allocated initially (R)
int inc_alloc;       No. of records to be added each time an extension
                     to the list is required (R)
int list_type;       = 0 Integrated spots list (others reserved for future 
                     expansion) (R)
int coord_type       Coordinate type flag 
                     =0 in mm from pattern centre (ideal)
                     =1 in mm from pattern centre (distortion corrected)
                     =2 in detector raster units (R)

Return:  >=0, the index of the allocated list
          -1, no spare reflection lists available
          -2, no spare 'dml' memory lists available
          -3, cannot allocate initial memory
          -4, init_alloc<1 or inc_alloc<1
          -5, invalid list type 
          -6, invalid coordinate type 

Add a reflection to a reflections list - lirl_addref

The routine lirl_addref (lirlf_addref) adds a new reflection to the end of the requested Laue integrated reflections list providing that the list has been initialised and that sufficient memory is available or can be allocated for it. The routine sets values for the main items and default values for the optional additional items.
 
Fortran call:
 
         CALL LIRLF_ADDREF  (MINDX, IH, IK, IL, IPACK, IPLATE, KSYM, 
        +                    XFD, YFD, ALAM,
        +                    MULT, MINHARM, MAXHARM, INCHARM, AI, SIGI,
        +                    ISPAT, ICLOS, IMEAS, IBAD, IOVLD, 
        +                    ICODE, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IH           i  (R)  Reflection 'h' index (as measured) (lowest harmonic 
IK           i  (R)  Reflection 'k' index (as measured)  present for a
IL           i  (R)  Reflection 'l' index (as measured)  multiple)
IPACK        i  (R)  Pack no. or index (1-65535)
IPLATE       i  (R)  Plate number within pack
KSYM         i  (R)  Symmetry no. (0 if not yet determined)
XFD          r  (R)  'xfd' coordinate of spot (units as defined by
                     ICOORD_TYPE in LIRLF_INIT call)
YFD          r  (R)  'yfd' coordinate of spot (units as defined by
                     ICOORD_TYPE in LIRLF_INIT call)
ALAM         r  (R)  Wavelength (for lowest harmonic present for a
                     multiple)
MULT         i  (R)  Multiplicity (1=single) (0=deconvoluted multiple)
MINHARM      i  (R)  Minimum harmonic (if MULT > 1)
MAXHARM      i  (R)  Maximum harmonic (if MULT > 1)
INCHARM      i  (R)  Harmonics increment (if MULT > 1)
AI           r  (R)  Integrated intensity
SIGI         r  (R)  Standard deviation of integrated intensity
ISPAT        i  (R)  Spatially overlapped flag =1 yes, =0 no
ICLOS        i  (R)  Spot too close to deconvolute flag =1 yes, =0 no
IMEAS        i  (R)  Integration done flag =1 yes, =0 no
IBAD         i  (R)  Bad spot other than overload flag =1 yes, =0 no
IOVLD        i  (R)  Intensity overload flag =1 yes, =0 no
ICODE        i  (R)  Code specific to integration routine (0-255)
IERR         i  (W)  Error return code from lirl_addref

   Indices are for lowest harmonic present for a multiple

   For a deconvoluted multiple, the following items are ignored:
   IPACK, IPLATE, XFD, YFD, ALAM, MINHARM, MAXHARM, INCHARM. ISPAT, ICLOS,
   IMEAS (treated as 1), IBAD, IOVLD, ICODE. Normally the indices will 
   be the unique ones and KSYM will be 1. Note also that the intensity
   and sigma(intensity) values are already normalised and scaled.
 
'C' call:
 
int lirl_addref (int mindx, int h, int k, int l, int ipack, int iplate,
                 int ksym, float xfd, float yfd, float alam, int mult,
                 int minharm, int maxharm, int incharm, float ai, float sigi,
                 int ispat, int iclos, int imeas,
                 int ibad, int iovld, int icode)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int h;           Reflection 'h' index (as measured) (R) (lowest harmonic
int k;           Reflection 'k' index (as measured) (R)  presennt for a
int l;           Reflection 'l' index (as measured) (R)  multiple)
int ipack;       Pack no. or index (1-65535) (R)
int iplate;      Plate number within pack (R)
int ksym;        Symmetry no. (0 if not yet determined) (R)
float xfd;       'xfd' coordinate of spot (units as defined by 
                 coord_type in lirl_init call) (R)
float yfd;       'yfd' coordinate of spot  (units as defined by 
                 coord_type in lirl_init call (R)
float alam;      Wavelength (for lowest harmonic present for a
                 multiple) (R)
int mult;        Multiplicity (1=single) (R)
int minharm;     Minimum harmonic (if mult!=1) (R)
int maxharm;     Maximum harmonic (if mult!=1) (R)
int incharm;     Harmonics increment (if mult!=1) (R)
float ai;        Integrated intensity (R)
float sigi;      Standard deviation of integrated intensity (R)
int ispat;       Spatially overlapped flag =1 yes, =0 no (R)
int iclos;       Spot too close to deconvolute flag =1 yes, =0 no (R)
int imeas;       Integration done flag =1 yes, =0 no (R)
int ibad;        Bad spot other than overload flag =1 yes, =0 no (R)
int iovld;       Intensity overload flag =1 yes, =0 no (R)
int icode;       Code specific to integration routine (0-255) (R) 

    Indices are for lowest harmonic present for a multiple 

    For a deconvoluted multiple, the following items are ignored:
    ipack, iplate, xfd, yfd, alam, minharm, maxharm, incharm. ispat, iclos,
    imeas (treated as 1), ibad, iovld, icode. Normally the indices will 
    be the unique ones and KSYM will be 1. Note also that the intensity
    and sigma(intensity) values are already normalised and scaled.


Return:  =  0, OK
         = -1, Invalid index given or list not initialised
         = -2, Cannot allocate required memory 

Update a reflection in a reflections list - lirl_putref

The routine lirl_putref (lirlf_putref) updates a reflection in a Laue integrated reflections list. The routine sets values for the main items and leaves unchanged any values currently stored for the optional additional items.
 
Fortran call:
 
         CALL LIRLF_PUTREF  (MINDX, IREF, IH, IK, IL, IPACK, IPLATE, KSYM, 
        +                    XFD, YFD, ALAM,
        +                    MULT, MINHARM, MAXHARM, INCHARM, AI, SIGI,
        +                    ISPAT, ICLOS, IMEAS, IBAD, IOVLD, 
        +                    ICODE, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards)  
IH           i  (R)  Reflection 'h' index (as measured) (lowest harmonic 
IK           i  (R)  Reflection 'k' index (as measured)  present for a 
IL           i  (R)  Reflection 'l' index (as measured)  multiple)
IPACK        i  (R)  Pack no. or index (1-65535)
IPLATE       i  (R)  Plate number within pack
KSYM         i  (R)  Symmetry no. (0 if not yet determined)
XFD          r  (R)  'xfd' coordinate of spot (units as defined by
                     ICOORD_TYPE in LIRLF_INIT call)
YFD          r  (R)  'yfd' coordinate of spot (units as defined by
                     ICOORD_TYPE in LIRLF_INIT call)
ALAM         r  (R)  Wavelength (for lowest harmonic present for a
                     multiple)
MULT         i  (R)  Multiplicity (1=single) (0=deconvoluted multiple)
MINHARM      i  (R)  Minimum harmonic (if MULT > 1)
MAXHARM      i  (R)  Maximum harmonic (if MULT > 1)
INCHARM      i  (R)  Harmonics increment (if MULT > 1)
AI           r  (R)  Integrated intensity
SIGI         r  (R)  Standard deviation of integrated intensity
ISPAT        i  (R)  Spatially overlapped flag =1 yes, =0 no
ICLOS        i  (R)  Spot too close to deconvolute flag =1 yes, =0 no
IMEAS        i  (R)  Integration done flag =1 yes, =0 no
IBAD         i  (R)  Bad spot other than overload flag =1 yes, =0 no
IOVLD        i  (R)  Intensity overload flag =1 yes, =0 no
ICODE        i  (R)  Code specific to integration routine (0-255)
IERR         i  (W)  Error return code from lirl_putref

   For a deconvoluted multiple, the following items are ignored:
   IPACK, IPLATE, XFD, YFD, ALAM, MINHARM, MAXHARM, INCHARM. ISPAT, ICLOS,
   IMEAS (treated as 1), IBAD, IOVLD, ICODE. Normally the indices will 
   be the unique ones and KSYM will be 1. Note also that the intensity
   and sigma(intensity) values are already normalised and scaled.
 
'C' call:
 
int lirl_putref (int mindx, int iref, int h, int k, int l, 
                 int ipack, int iplate,
                 int ksym, float xfd, float yfd, float alam, int mult,
                 int minharm, int maxharm, int incharm, float ai, float sigi,
                 int ispat, int iclos, int imeas,
                 int ibad, int iovld, int icode)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int iref;        Reflection number (from 1 upwards) (R)
int h;           Reflection 'h' index (as measured) (R) (lowest harmonic
int k;           Reflection 'k' index (as measured) (R)  present for a
int l;           Reflection 'l' index (as measured) (R)  multiple)
int ipack;       Pack no. or index (1-65535) (R)
int iplate;      Plate number within pack (R)
int ksym;        Symmetry no. (0 if indices are as measured) (R)
float xfd;       'xfd' coordinate of spot (units as defined by 
                  coord_type in lirl_init call) (R)
float yfd;       'yfd' coordinate of spot (units as defined by 
                  coord_type in lirl_init call) (R)
float alam;      Wavelength (for lowest harmonic present for a
                 multiple) (R)
int mult;        Multiplicity (1=single) (R)
int minharm;     Minimum harmonic (if mult!=1) (R)
int maxharm;     Maximum harmonic (if mult!=1) (R)
int incharm;     Harmonics increment (if mult!=1) (R)
float ai;        Integrated intensity (R)
float sigi;      Standard deviation of integrated intensity (R)
int ispat;       Spatially overlapped flag =1 yes, =0 no (R)
int iclos;       Spot too close to deconvolute flag =1 yes, =0 no (R)
int imeas;       Integration done flag =1 yes, =0 no (R)
int ibad;        Bad spot other than overload flag =1 yes, =0 no (R)
int iovld;       Intensity overload flag =1 yes, =0 no (R)
int icode;       Code specific to integration routine (0-255) (R)

   For a deconvoluted multiple, the following items are ignored:
   ipack, iplate, xfd, yfd, alam, minharm, maxharm, incharm. ispat, iclos,
   imeas (treated as 1), ibad, iovld, icode. Normally the indices will 
   be the unique ones and KSYM will be 1. Note also that the intensity
   and sigma(intensity) values are already normalised and scaled.

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Set number of overload pixels - lirl_set_ovpix

The routine lirl_set_ovpix (lirlf_set_ovpix) sets the value for the number of overload pixels found for a reflection.
 
Fortran call:
 
         CALL LIRLF_SET_OVPIX  (MINDX, IREF, NUM_OVPIX, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards) 
NUM_OVPIX    i  (R)  The number of overload pixels (-1 = not known)
                     (Values > 255 stored as 255)
IERR         i  (W)  Error return code from lirl_set_ovpix 
 
'C' call:
 
int lirl_set_ovpix (int mindx, int iref, int num_ovpix)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int iref;        Reflection number (from 1 upwards) (R)
int num_ovpix;   The number of overload pixels (-1 = not known)
                 (Values > 255 stored as 255) (R)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Set reflection 'outlier' flag - lirl_set_outlier

The routine lirl_set_outlier (lirlf_set_outlier) sets the value for the for a reflection 'outlier' flag.
 
Fortran call:
 
         CALL LIRLF_SET_OUTLIER  (MINDX, IREF, ICODE, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards) 
ICODE        i  (R)  Program dependent flag 0-255; 0 indicates
                     that the reflection is OK (i.e. not an
                     outlier) and any value >0 indicates an
                     outlier.
IERR         i  (W)  Error return code from lirl_set_outlier 
 
'C' call:
 
int lirl_set_outlier (int mindx, int iref, int icode)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int iref;        Reflection number (from 1 upwards) (R)
int icode;       Program dependent flag 0-255; 0 indicates
                 that the reflection is OK (i.e. not an outlier) 
                 and any value >0 indicates an outlier. (R)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Set reference intensity and sigma - lirl_set_refint

The routine lirl_set_refint (lirlf_set_refint) sets the values for a reflection reference intensity and its sigma value.
 
Fortran call:
 
         CALL LIRLF_SET_REFINT  (MINDX, IREF, REFINT, SIGREF, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards) 
REFINT       r  (R)  The reference intensity.
SIGREF       r  (R)  sigma(reference intensity). A value of 0.0
                     indicates that the intensity is not present.
IERR         i  (W)  Error return code from lirl_set_refint 
 
'C' call:
 
int lirl_set_refint (int mindx, int iref, float refint, float sigref)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int iref;        Reflection number (from 1 upwards) (R)
float refint;    The reference intensity. (R)
float sigref;    sigma(reference intensity). A value of 0.0
                 indicates that the intensity is not present. (R)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Update 'ksym' for a reflection - lirl_putksym

The routine lirl_putksym (lirlf_putksym) updates a reflection 'ksym' value in a Laue integrated reflections list.
 
Fortran call:
 
         CALL LIRLF_PUTKSYM  (MINDX, IREF, KSYM, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards)  
KSYM         i  (R)  Symmetry no. (0 if not yet determined)
IERR         i  (W)  Error return code from lirl_putksym
 
'C' call:
 
int lirl_putksym (int mindx, int iref, int ksym)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int iref;        Reflection number (from 1 upwards) (R)
int ksym;        Symmetry no. (0 if indices are as measured) (R)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Pass symmetry matrices to LIRL routines - lirl_setsym

The routine lirl_setsym (lirlf_setsym) passes the symmetry matrices (as defined in the CCP4 and LDM routines) to the LIRL routines for internal use when indices need to be converted to various forms. Note that the symmetry matrices must remain in place as copies are not made.
 
Fortran call:
 
         CALL LIRLF_SETSYM  (MINDX, RSYM, RSYMIV, IERR)
 
Parameters:
 
MINDX          i  (R)  Index as returned by LIRLF_INIT
RSYM(4,4,96)   r  (R)  Symmetry matrices (as CCP4 & LDM)
RSYMIV(4,4,96) r  (R)  Inverse symmetry matrices (as CCP4 & LDM)
IERR           i  (W)  Error return code from lirl_setsym
 
'C' call:
 
int lirl_setsym (int mindx, float *rsym, float *rsymiv)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
float * rsym;    Symmetry matrices (as CCP4 & LDM) - see Fortran 
                 call (R)
float * rsymiv;  Inverse symmetry matrices (as CCP4 & LDM) - see Fortran
                 call (R)

Return:  >= 0, The number of reflections
         = -1, Invalid index given or list not initialised

GET DATA FROM 'LIRL' LISTS

Introduction

Routines are available to get the number of reflection records and details of the individual reflections from a Laue integrated reflections list.

The following routines are available:

Get number of reflections in a list - lirl_numrefs
Get sort order - lirl_sortord
Get reflection indices for a reflection - lirl_gethkl
Get unique reflection indices for a reflection - lirl_hklunq
Get unique nodal indices for a reflection - lirl_nodunq
Get reflection details for a reflection - lirl_getref
Get number of overload pixels - lirl_get_ovpix
Get reflection 'outlier' flag - lirl_get_outlier
Get reference intensity and sigma - lirl_get_refint

Get number of reflections in a list - lirl_numrefs

The routine lirl_numrefs (lirlf_numrefs) returns the number of reflections currently stored in a Laue integrated reflections list.
 
Fortran call:
 
         CALL LIRLF_NUMREFS  (MINDX, NUMREFS)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
NUMREFS      i  (W)  No. of reflections in the reflections list. If
                     there is an error a value of -1 will be returned
                     from the lirl_numrefs call
 
'C' call:
 
int lirl_numrefs (int mindx)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)

Return:  >= 0, The number of reflections
         = -1, Invalid index given or list not initialised

Get sort order - lirl_sortord

The routine lirl_sortord (lirlf_sortord) returns the current sort order ('ityp' code as used in call to lirl_sort (lirlf_sort) call).
 
Fortran call:
 
         CALL LIRLF_SORTORD  (MINDX, ISORT)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
ISORT        i  (W)  The sort order code (>0), 0=unknown. The code
                     is that was used as the 'ITYP' parameter in the
                     latest LIRLF_SORT call. If there is an error  
                     in the call, a value of -1 will be returned.
 
'C' call:
 
int lirl_sortord (int mindx)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)

Return:  = 0, Sort order unknown
         > 0, The code is that was used as the 'ityp' parameter in 
              the latest 'lirl_sort' call.
         =-1, Invalid index given or list not initialised

Get reflection indices for a reflection - lirl_gethkl

The routine lirl_gethkl (lirlf_gethkl) gets the reflection indices and symmetry no. (if set) for a given reflection in a Laue integrated reflection list.
 
Fortran call:
 
         CALL LIRLF_GETHKL  (MINDX, IREF, IH, IK, IL, KSYM, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards)
IH           i  (W)  Reflection 'h' index (as measured)
IK           i  (W)  Reflection 'k' index (as measured)
IL           i  (W)  Reflection 'l' index (as measured)
KSYM         i  (W)  Symmetry no. (0 if not yet set)
IERR         i  (W)  Error return code from lirl_gethkl
 
'C' call:
 
int lirl_gethkl (int mindx, int iref, int *h, int *k, int *l, int *ksym)
 
Parameters:
 
int mindx;        Index as returned by lirl_init (R)
int iref;         Reflection number (from 1 upwards) (R)
int *h;           Reflection 'h' index  (as measured) (W)
int *k;           Reflection 'k' index (as measured) (W)
int *l;           Reflection 'l' index (as measured) (W)
int ksym;         Symmetry no. (0 if not set) (W)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or reflection
               record not present.

Get unique reflection indices for a reflection - lirl_hklunq

The routine lirl_hklunq (lirlf_hklunq) gets the unique reflection indices and for a given reflection in a Laue integrated reflection list. The symmetry number must have been set (e.g using lirl_addref, lirl_putref or lirl_putksym (lirlf_addref, lirlf_putref or lirlf_putksym) and the symmetry matrices must have been passed to the LIRL routines using the lirl_setsym (lirlf_setsym) routine.
 
Fortran call:
 
         CALL LIRLF_HKLUNQ  (MINDX, IREF, IH, IK, IL, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards)
IH           i  (W)  Reflection 'h' index (unique) (0 if error)
IK           i  (W)  Reflection 'k' index (unique) (0 if error)
IL           i  (W)  Reflection 'l' index (unique) (0 if error)
IERR         i  (W)  Error return code from lirl_hklunq
 
'C' call:
 
int lirl_hklunq (int mindx, int iref, int *h, int *k, int *l)
 
Parameters:
 
int mindx;        Index as returned by lirl_init (R)
int iref;         Reflection number (from 1 upwards) (R)
int *h;           Reflection 'h' index  (unique) (0 if error)(W)
int *k;           Reflection 'k' index (unique) (0 if error)(W)
int *l;           Reflection 'l' index (unique) (0 if error)(W)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or reflection
               record not present.
         = -2, symmetry no. not set
         = -3, symmetry matrices not defined

Get unique nodal indices for a reflection - lirl_nodunq

The routine lirl_nodunq (lirlf_nodunq) gets the unique nodal reflection indices and nodal lambda value for a given reflection in a Laue integrated reflection list. The symmetry number must have been set (e.g using lirl_addref, lirl_putref or lirl_putksym (lirlf_addref, lirlf_putref or lirlf_putksym) and the symmetry matrices must have been passed to the LIRL routines using the lirl_setsym (lirlf_setsym) routine.
 
Fortran call:
 
         CALL LIRLF_NODUNQ  (MINDX, IREF, NH, NK, NL, ALNOD, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards)
NH           i  (W)  Reflection 'h' nodal index (unique) (0 if error)
NK           i  (W)  Reflection 'k' nodal index (unique) (0 if error)
NL           i  (W)  Reflection 'l' nodal index (unique) (0 if error)
ALNOD        r  (W)  Nodal lambda value
IERR         i  (W)  Error return code from lirl_hklunq
 
'C' call:
 
int lirl_nodunq (int mindx, int iref, int *nh, int *nk, int *nl, float *alnod)
 
Parameters:
 
int mindx;         Index as returned by lirl_init (R)
int iref;          Reflection number (from 1 upwards) (R)
int *nh;           Reflection 'h' nodal index (unique) (0 if error)(W)
int *nk;           Reflection 'k' nodal index (unique) (0 if error)(W)
int *nl;           Reflection 'l' nodal index (unique) (0 if error)(W)
float *alnod;      Nodal lambda value (W)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or reflection
               record not present.
         = -2, symmetry no. not set
         = -3, symmetry matrices not defined

Get reflection details for a reflection - lirl_getref

The routine lirl_getref (lirlf_getref) gets the reflection details for the main items for a given reflection in a Laue integrated reflection list. The values for the optional additional items are retrieved via other routines if required.
 
Fortran call:
 
         CALL LIRLF_GETREF  (MINDX, IREF, IH, IK, IL, IPACK, IPLATE, 
        +                    KSYM, XFD, YFD, ALAM,
        +                    MULT, MINHARM, MAXHARM, INCHARM, AI, SIGI,
        +                    ISPAT, ICLOS, IMEAS, IBAD, IOVLD, 
        +                    ICODE, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards)
IH           i  (W)  Reflection 'h' index (as measured)
IK           i  (W)  Reflection 'k' index (as measured)
IL           i  (W)  Reflection 'l' index (as measured)
IL           i  (R)  Reflection 'l' index
IPACK        i  (W)  Pack no. or index (1-65535)
IPLATE       i  (W)  Plate number within pack
KSYM         i  (W)  Symmetry no. (0 if not yet determined)
XFD          r  (W)  'xfd' coordinate of spot  (units as defined by 
                     ICOORD_TYPE in LIRLF_INIT call)
YFD          r  (W)  'yfd' coordinate of spot (units as defined by 
                     ICOORD_TYPE in LIRLF_INIT call)
ALAM         r  (W)  Wavelength (for lowest harmonic present for a
                     multiple)
MULT         i  (W)  Multiplicity (1=single)
MINHARM      i  (W)  Minimum harmonic (set if MULT not 1, otherwise 0)
MAXHARM      i  (W)  Maximum harmonic (set if MULT not 1, otherwise 0)
INCHARM      i  (W)  Harmonics increment (set if MULT not 1, otherwise 0)
AI           r  (W)  Integrated intensity
SIGI         r  (W)  Standard deviation of integrated intensity
ISPAT        i  (W)  Spatially overlapped flag =1 yes, =0 no
ICLOS        i  (W)  Spot too close to deconvolute flag =1 yes, =0 no
IMEAS        i  (W)  Integration done flag =1 yes, =0 no
IBAD         i  (W)  Bad spot other than overload flag =1 yes, =0 no
IOVLD        i  (W)  Intensity overload flag =1 yes, =0 no
ICODE        i  (W)  Code specific to integration routine (0-255)
IERR         i  (W)  Error return code from lirl_getref

   For a deconvoluted multiple, the following items are returned as zero:
   IPACK, IPLATE, XFD, YFD, ALAM, MINHARM, MAXHARM, INCHARM. ISPAT, ICLOS,
   IBAD, IOVLD, ICODE. IMEAS will be returned as 1. Note also that the 
   intensity and sigma(intensity) values are already normalised and scaled.
 
'C' call:
 
int lirl_getref (int mindx, int iref, int *h, int *k, int *l, int *ipack, 
                 int *iplate, int *ksym, 
                 float *xfd, float *yfd, float *alam, 
                 int *mult, int *minharm, int *maxharm, int *incharm, 
                 float *ai, float *sigi,
                 int *ispat, int *iclos, int *imeas, int *ibad, int *iovld, 
                 int *icode)
 
Parameters:
 
int mindx;        Index as returned by lirl_init (R)
int iref;         Reflection number (from 1 upwards) (R)
int *h;           Reflection 'h' index  (as measured) (W)
int *k;           Reflection 'k' index (as measured) (W)
int *l;           Reflection 'l' index (as measured) (W)
int *ipack;       Pack no. or index (1-65535) (W)
int *iplate;      Plate number within pack (W)
int *ksym;        Symmetry no. (0 if indices are as measured) (W)
float *xfd;       'xfd' coordinate of spot (units as defined by 
                  coord_type in lirl_init call) (W)
float *yfd;       'yfd' coordinate of spot (units as defined by 
                  coord_type in lirl_init call) (W)
float *alam;      Wavelength (for lowest harmonic present for a
                  multiple) (W)
int *mult;        Multiplicity (1=single) (W)
int *minharm;     Minimum harmonic (if mult!=1, else 0) (W)
int *maxharm;     Maximum harmonic (if mult!=1, else 0) (W)
int *incharm;     Harmonics increment (if mult!=1, else 0) (W)
float *ai;        Integrated intensity (W)
float *sigi;      Standard deviation of integrated intensity (W)
int *ispat;       Spatially overlapped flag =1 yes, =0 no (W)
int *iclos;       Spot too close to deconvolute flag =1 yes, =0 no (W)
int *imeas;       Integration done flag =1 yes, =0 no (W)
int *ibad;        Bad spot other than overload flag =1 yes, =0 no (W)
int *iovld;       Intensity overload flag =1 yes, =0 no (W)
int *icode;       Code specific to integration routine (0-255) (W)

   For a deconvoluted multiple, the following items are returned as zero:
   ipack, iplate, xfd, yfd, alam, minharm, maxharm, incharm. ispat, iclos,
   ibad, iovld, icode. imeas will be returned as 1. Note also that the 
   intensity and sigma(intensity) values are already normalised and scaled.

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or reflection
               record not present.

Get number of overload pixels - lirl_get_ovpix

The routine lirl_get_ovpix (lirlf_get_ovpix) returns the value for the number of overload pixels found set for a reflection.
 
Fortran call:
 
         CALL LIRLF_GET_OVPIX  (MINDX, IREF, NUM_OVPIX, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards) 
NUM_OVPIX    i  (W)  Returns the number of overload pixels 0-255,
                     (-1 = not known)
IERR         i  (W)  Error return code from lirl_get_ovpix 
 
'C' call:
 
int lirl_get_ovpix (int mindx, int iref, int *num_ovpix)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int iref;        Reflection number (from 1 upwards) (R)
int *num_ovpix;  Returns the number of overload pixels  0-255,
                 (-1 = not known) (W)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Get reflection 'outlier' flag - lirl_get_outlier

The routine lirl_get_outlier (lirlf_get_outlier) gets the value for the for a reflection 'outlier' flag.
 
Fortran call:
 
         CALL LIRLF_GET_OUTLIER  (MINDX, IREF, ICODE, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards) 
ICODE        i  (W)  Returns the program dependent flag 0-255; 
                     0 indicates that the reflection is OK (i.e. 
                     not an outlier) and any value >0 indicates an
                     outlier.
IERR         i  (W)  Error return code from lirl_get_outlier 
 
'C' call:
 
int lirl_get_outlier (int mindx, int iref, int *icode)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int iref;        Reflection number (from 1 upwards) (R)
int *icode;      Returns the program dependent flag 0-255; 
                 0 indicates that the reflection is OK (i.e. 
                 not an outlier) and any value >0 indicates an
                 outlier. (W)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Get reference intensity and sigma - lirl_get_refint

The routine lirl_get_refint (lirlf_get_refint) gets the values for a reflection reference intensity and its sigma value.
 
Fortran call:
 
         CALL LIRLF_GET_REFINT  (MINDX, IREF, REFINT, SIGREF, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards) 
REFINT       r  (W)  Returns the reference intensity.
SIGREF       r  (W)  Returns sigma(reference intensity). A value of 0.0
                     indicates that the intensity is not present.
IERR         i  (W)  Error return code from lirl_get_refint 
 
'C' call:
 
int lirl_get_refint (int mindx, int iref, float *refint, float *sigref)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int iref;        Reflection number (from 1 upwards) (R)
float *refint;   Returns the reference intensity. (W)
float *sigref;   Returns sigma(reference intensity). A value of 0.0
                 indicates that the intensity is not present. (W)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

SORT 'LIRL' LISTS

Introduction

A routine enables Laue integrated reflection lists to be sorted on a number of the stored parameters.

The following routines are available:

Sort LIRL reflection lists - lirl_sort

Sort LIRL reflection lists - lirl_sort

The routine lirl_sort (lirlf_sort) is used to sort the reflection list by reflection indices of various forms or on various other parameters. For options involving sorts on unique indices, the symmetry number must have been set for all the reflections (e.g using lirl_addref, lirl_putref or lirl_putksym (lirlf_addref, lirlf_putref or lirlf_putksym) and the symmetry matrices must have been passed to the LIRL routines using the lirl_setsym (lirlf_setsym) routine. The sorting process preserves the data order of items which have the same value of the sort key (this requires allocation of additional memory and hence the error return of the sort routine should alwasy be checked)
 
Fortran call:
 
         CALL LIRLF_SORT  (MINDX, ITYP, IERR)
 
Parameters:
 
MINDX          i  (R)  Index as returned by LIRLF_INIT
ITYP           i  (R)  = 1 sort on measured hkl
                       = 2 sort on unique hkl
                       = 3 sort on pack no./index
                       = 4 sort on plate no.
                       = 5 sort on lambda
                       = 6 sort on xfd
                       = 7 sort on yfd
                       = 8 sort on intensity
                       = 9 sort on multiplicity
                       = 10 sort on unique hkl and sign
                       = 11 sort on unique nodal indices
IERR           i  (W)  Error return code from lirl_sort
 
'C' call:
 
int lirl_sort (int mindx, int ityp)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int ityp;        = 1 sort on measured indices
                 = 2 sort on unique indices
                 = 3 sort on pack no./index
                 = 4 sort on plate no.
                 = 5 sort on lambda
                 = 6 sort on xfd
                 = 7 sort on yfd
                 = 8 sort on intensity
                 = 9 sort on multiplicity
                 = 10 sort on unique hkl and sign
                 = 11 sort on unique nodal indices
                 (R)

Return:  >= 0, The number of reflections
         = -1, Invalid index given or list not initialised or invalid 
               index type requested
         = -2, Not all 'ksym' values set
         = -3, Symmetry matrices not defined (if required) 
         = -4, Cannot allocate temporary memory

DELETE AND CLEAR 'LIRL' DATA

Introduction

Routines enable the data stored in a Laue integrated reflection list to be deleted for a given pack or plate and also for complete lists to be cleared or removed.

The following routines are available:

Delete reflections for given pack(s)/plate(s) - lirl_delete
Clear a reflections list - lirl_clear
Clear and free a reflections list - lirl_free

Delete reflections for given pack(s)/plate(s) - lirl_delete

The routine lirl_delete (lirlf_delete) deletes the reflections for a requested pack (or all packs) and for a requested plate (or all plates). Unused space at the end of the list will be automatically freed.
 
Fortran call:
 
         CALL LIRLF_DELETE  (MINDX, IPACK, IPLATE, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IPACK        i  (R)  No. (or index) of pack for which reflections 
                     are to be deleted; 0 = all packs
IPLATE       i  (R)  Plate no. for requested pack(s) of reflections
                     to be deleted; 0 = all plates
IERR         i  (W)  Error return code from lirl_delete
 
'C' call:
 
int lirl_delete (int mindx, int ipack, int plate)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int ipack;       No. or index of pack to be deleted; 0 = all packs (R)
int plate;       Plate no. to be deleted; 0 = all plates (R)

Return:  =  0, OK
         = -1, Invalid index given or list not initialised

Clear a reflections list - lirl_clear

The routine lirl_clear (lirlf_clear) clears a reflections list. The memory is not released and the index returned from the lirl_init (lirlf_init) call can still be used and new reflections may be added etc. as required.
 
Fortran call:
 
         CALL LIRLF_CLEAR  (MINDX, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IERR         i  (W)  Error return code from lirl_clear
 
'C' call:
 
int lirl_clear (int mindx)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)

Return:  =  0, OK
         = -1, Invalid index given or list not initialised

Clear and free a reflections list - lirl_free

The routine lirl_free (lirlf_free) clears a reflections list and makes it available for re-use via another initialisation call. All the memory that was allocated for the list is freed.
 
Fortran call:
 
         CALL LIRLF_FREE  (MINDX, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IERR         i  (W)  Error return code from lirl_free
 
'C' call:
 
int lirl_free (int mindx)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)

Return:  =  0, OK
         = -1, Invalid index given or list not initialised

ROUTINES FOR THE LAUE SCALING MODULE

Introduction

These are a series of routines written specifically for use with the Laue Scaling Module (LSM).

The following routines are available:

Start to read reflections - lirl_lsm_start
Read next reflection set - lirl_lsm_next
Set LSM temporary scaling items - lirl_lsm_settemp
Set 'use reflection' flag - lirl_lsm_setuse
Get LSM scaling items - lirl_lsm_scalobs
Get LSM range items - lirl_lsm_getranges

Start to read reflections - lirl_lsm_start

The routine lirl_lsm_start (lirlf_lsm_start) is called to set some initialisation flags before sets of reflections are read using the routine lirl_lsl_next (lirlf_lsm_next). Note that the 'use_reflection' flag must be set for each reflection before reading reflection sets from a list. Note also that only one reflection list may be accessed at a time using the lirl_lsm_start/lirl_lsm_next routines and that the reflections must be sorted on unique hkl (or unique_hkl and sign if sign separated data are being used).
 
Fortran call:
 
         CALL LIRLF_LSM_START  (MINDX, ISIGN, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
ISIGN        i  (R)  Flag =1 prepare to return sign separated reflection sets
                          =0 ingore reflection I+/I- sign
IERR         i  (W)  Error return code from lirl_lsm_start
 
'C' call:
 
int lirl_lsm_start (int mindx, int isign)
 
Parameters:
 
int mindx;       Index as returned by lirl_init (R)
int isign;       Flag =1 prepare to return sign separated reflection sets
                      =0 ingore reflection I+/I- sign (R)

Return:  =  0, OK
         = -1, Invalid index given or list not initialised

Read next reflection set - lirl_lsm_next

The routine lirl_lsm_next (lirlf_lsm_next) is called to return the next reflection set from the reflection list. Note that the routine lirl_lsm_start (lirlf_lsm_start) must be called before attempting to read the first reflection set and the 'use_reflection' flag must be set for each reflection (except for deconvoluted multiples where used) before reading the reflection sets. Note that the list index is set via lirl_lsm_start and is stored internally; only one list may be accessed at a time using lirl_lsm_start and lirl_lsm_next.
 
Fortran call:
 
         CALL LIRLF_LSM_NEXT  (IDX_ARR, MAX_ARR, NREFS, MULT_INC, IFLAG)
 
Parameters:
 
IDX_ARR      i  (W)  Array of reflection indices (from 1 upwards) for
                     the reflections in the set (dimensioned to at least
                     MAX_ARR).
MAX_ARR      i  (R)  The maximum no. of reflections which may be returned
                     in the set.
NREFS        i  (W)  The number of reflections in the returned set.
MULT_INC     i  (R)  Include deconvoluted multiples flag
                      =1 yes, (deconvoluted multiples included 
                               unconditionally)
                      =0 no, deconvoluted multiples excluded

IFLAG        i  (W)  Return flag from lirl_lsm_next 
                     =0    OK
                     =-1   End of list reached
                     >0    List truncated; IFLAG shows the actual
                           no. of reflections present in the set.
 
'C' call:
 
int lirl_lsm_next (int idx_arr[], int max_arr, int *nrefs, int mult_inc)
 
Parameters:
 
int idx_arr[];   Array of reflection indices (from 1 upwards) for
                 the reflections in the set. (dimensioned to at least
                 max_arr). (W)
int max_arr;     The maximum no. of reflections which may be returned
                 in the set. (R)
int *nrefs;      The no. of reflections in the set. (W)
int mult_inc;    Include deconvoluted multiples flag
                 =1 yes, (deconvoluted multiples included unconditionally)
                 =0 no, deconvoluted multiples excluded

Return:  =  0,   OK
         = -1,   End of list reached
         > 0,    List truncated; IFLAG shows the actual
                 no. of reflections present in the set. 

Set LSM temporary scaling items - lirl_lsm_settemp

The routine lirl_lsm_settemp (lirlf_lsm_settemp) is used to set the temporary pre-calculated values which will enable efficient scaling to be carried out within the Laue Scaling Module (LSM) routines. (The unique indices will also be calculated and stored)
 
Fortran call:
 
         CALL LIRLF_LSM_SETTEMP  (MINDX, IREF, ABSCOR_NU, PSI_LOCAL,
        +                         PSI_GLOBAL, STOL2, AL3C2T, ABSCOR_LAMFN, 
        +                         OB_LPFAC, KNORM, KPLSC, IUSE, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards) 
ABSCOR_NU    r  (R)  'nu' angle for absorption correction 
PSI_LOCAL    r  (R)  'psi' angle for absorption correction (local)
PSI_GLOBAL   r  (R)  'psi' angle for absorption correction (global)
STOL2        r  (R)  sin**theta/lambda**2
AL3C2T       r  (R)  lambda**3/(cos(2*theta))
ABSCOR_LAMFN r  (R)  lambda dependent function for absorption correction
OB_LPFAC     r  (R)  Combined obliquity/Lorentz/polarisation factor
KNORM        i  (R)  Normalisation curve range no. flag
KPLSC        i  (R)  Plate to plate scaling range flag
IUSE         i  (R)  Use reflection flag =1 yes, =0 no
IERR         i  (W)  Error return code from lirl_lsm_settemp
 
'C' call:
 
int lirl_lsm_settemp (int mindx, int iref, float abscor_nu, float psi_local,
                      float psi_global, float stol2, float al3c2t, 
                      float abscor_lamfn, float ob_lpfac, int knorm, 
                      int kplsc, int iuse)
 
Parameters:
 
int mindx;          Index as returned by lirl_init (R)
int iref;           Reflection number (from 1 upwards) (R)
float abscor_nu;    'nu' angle for absorption correction (R)
float psi_local;    'psi' angle for absorption correction (local) (R)
float psi_global;   'psi' angle for absorption correction (global) (R)
float stol2;        sin**theta/lambda**2 (R)
float al3c2t;       lambda**3/(cos(2*theta)) (R)
float abscor_lamfn; lambda dependent function for absorption 
                    correction (R)
float ob_lpfac;     Combined obliquity/Lorentz/polarisation factor (R)
int knorm;          Normalisation curve range no. flag (R)
int kplsc;          Plate to plate scaling range flag (R)
int iuse;           Use reflection flag =1 yes, =0 no (R)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Set 'use reflection' flag - lirl_lsm_setuse

The routine lirl_lsm_setuse (lirlf_lsm_setuse) is used to set the temporary 'use_reflection' flag for a reflection within the Laue Scaling Module (LSM) routines.
 
Fortran call:
 
         CALL LIRLF_LSM_SETUSE  (MINDX, IREF, IUSE, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards) 
IUSE         i  (R)  Use reflection flag =1 yes, =0 no
IERR         i  (W)  Error return code from lirl_lsm_setuse
 
'C' call:
 
int lirl_lsm_setuse (int mindx, int iref, int iuse)
 
Parameters:
 
int mindx;          Index as returned by lirl_init (R)
int iref;           Reflection number (from 1 upwards) (R)
int iuse;           Use reflection flag =1 yes, =0 no (R)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Get LSM scaling items - lirl_lsm_scalobs

The routine lirl_lsm_scalobs (lirlf_lsm_scalobs) is used to get the items required to calculate a scaled intensity and sigma(intensity) value for use within the LSM refinement and scaling routines. Note that values must have been set for all the required items - this routine does not determine them.
 
Fortran call:
 
         CALL LIRLF_LSM_SCALOBS  (MINDX, IREF, IPACK, IPLATE,
        +                         AINT, SIGINT, ALAM, REFINT,
        +                         ABSCOR_NU, PSI_LOCAL, PSI_GLOBAL,
        +                         STOL2, AL3C2T, ABSCOR_LAMFN, OB_LPFAC,
        +                         KNORM, KPLSC, IUSE, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards)
IPACK        i  (W)  Returns the pack number 
IPLATE       i  (W)  Returns the plate number 
AINT         r  (W)  Returns the intensity value (unscaled)
SIGINT       r  (W)  Returns the sig(I) (unscaled)
ALAM         r  (W)  Returns the lambda value
REFINT       r  (W)  Returns the reference intensity
ABSCOR_NU    r  (W)  Returns 'nu' angle for absorption correction 
PSI_LOCAL    r  (W)  Returns 'psi' angle for absorption correction (local)
PSI_GLOBAL   r  (W)  Returns 'psi' angle for absorption correction (global)
STOL2        r  (W)  Returns sin**theta/lambda**2
AL3C2T       r  (W)  Returns lambda**3/(cos(2*theta))
ABSCOR_LAMFN r  (W)  Returns lambda dependent function for absorption 
                     correction
OB_LPFAC     r  (W)  Returns combined obliquity/Lorentz/polarisation 
                     factor
KNORM        i  (W)  Returns normalisation curve range no. flag
KPLSC        i  (W)  Returns plate to plate scaling range flag
IUSE         i  (W)  Returns use reflection flag =1 yes, =0 no
IERR         i  (W)  Error return code from lirl_lsm_scalobs
 
'C' call:
 
int lirl_lsm_scalobs (int mindx, int iref, int *ipack, int *iplate,
                     float *aint, float *sigint, float *alam, 
                     float *refint, float *abscor_nu, 
                     float *psi_local, float *psi_global, float *stol2, 
                     float *al3c2t, float *abscor_lamfn, float *ob_lpfac, 
                     int *knorm, int *kplsc, int *iuse)
 
Parameters:
 
int mindx;           Index as returned by lirl_init (R)
int iref;            Reflection number (from 1 upwards) (R)
int *ipack;          Returns the pack number (W)
int *iplate;         Returns the plate number (W)
float *aint;         Returns the intensity value (unscaled) (W)
float *sigint;       Returns the sig(I) (unscaled) (W)
float *alam;         Returns the lambda value (W)
float *refint;       Returns the reference intensity (W)
float *abscor_nu;    Returns 'nu' angle for absorption correction (W)
float *psi_local;    Returns 'psi' angle for absorption correction 
                     (local) (W)
float *psi_global;   Returns 'psi' angle for absorption correction 
                     (global) (W)
float *stol2;        Returns sin**theta/lambda**2 (W)
float *al3c2t;       Returns lambda**3/(cos(2*theta)) (W)
float *abscor_lamfn; Returns lambda dependent function for absorption 
                     correction (W)
float *ob_lpfac;     Returns combined obliquity/Lorentz/polarisation 
                     factor (W)
int *knorm;          Returns normalisation curve range no. flag (W)
int *kplsc;          Returns plate to plate scaling range flag (W)
int *iuse;           Returns use reflection flag =1 yes, =0 no (W)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present

Get LSM range items - lirl_lsm_getranges

The routine lirl_lsm_getranges (lirlf_lsm_getranges) is used to get the stored values for the normalisation curve wavelength range and plate scaling wavelength range flags for use within the LSM refinement and scaling routines. Note that values must have been set for the required items - this routine does not determine them.
 
Fortran call:
 
         CALL LIRLF_LSM_GETRANGES  (MINDX, IREF, KNORM, KPLSC, 
        +                           ABSCOR_NU, PSI_LOC, PSI_GLOB, IERR)
 
Parameters:
 
MINDX        i  (R)  Index as returned by LIRLF_INIT
IREF         i  (R)  The reflection number (from 1 upwards)
KNORM        i  (W)  Returns normalisation curve range no. flag
KPLSC        i  (W)  Returns plate to plate scaling range flag
ABSCOR_NU    r  (W)  'nu' value
PSI_LOC      r  (W)  'psi' value (local)
PSI_GLOB     r  (W)  'psi' valus (global)
IERR         i  (W)  Error return code from lirl_lsm_getranges
 
'C' call:
 
int lirl_lsm_getranges (int mindx, int iref,  int *knorm, int *kplsc,
                       float *abscor_nu, float *psi_loc, float *psi_glob)
 
Parameters:
 
int mindx;           Index as returned by lirl_init (R)
int iref;            Reflection number (from 1 upwards) (R)
int *knorm;          Returns normalisation curve range no. flag (W)
int *kplsc;          Returns plate to plate scaling range flag (W)
float *abscor_nu;    Returns 'nu' value (W)
float *psi_loc;      Returns 'psi' value (local) (W)
float *psi_glob;     Returns 'psi' value (global) (W)

Return:  =  0, OK
         = -1, Invalid index given, list not initialised or record not present



John W. Campbell
CCLRC Daresbury Laboratory
Last update 16 Jan 1998