NAME: astwave PURPOSE: (one line only) Compute the effective wavelength of an observation for astrometry DESCRIPTION: This routine computes the effective wavelength of observation. This wavelength is actually a pivot wavelength, or, where half of the detected photons (not energy) are blueward of the wavelength and half are redward of the wavelength. This wavelength depends on the target color and the filter being used. This wavelength is used to support making a differential refraction correction to an astrometric measurement from ground-based imaging of the sky. CATEGORY: Astrometry CALLING SEQUENCE: astwave,filter,colname,color,wave INPUTS: filter - String, name of the filter used for the observation (case-sensitive) colname - String, name of the color (eg., 'V-R') color - Value of the color for colname OPTIONAL INPUT PARAMETERS: KEYWORD INPUT PARAMETERS: REFFILE - flux reference file to use (see fluxref.pro for more details) default is provided by fluxref.pro OUTPUTS: wave - pivot wavelength for the observations in nanometers (nm) KEYWORD OUTPUT PARAMETERS: CONFIGURATION: COMMON BLOCKS: astwave_com - used to cache the data used for the calculation. The filter curve is saved to prevent reading the filter curve with each call. This is effective only if the filter rarely changes between successive calls. SIDE EFFECTS: RESTRICTIONS: PROCEDURE: The filter transmission curve is loaded (or re-used from the prior call). The color is on the Vegamag system and defines a linear correction to the reference flux spectrum. This color corrected spectrum is then combined with the filter curve to derive the pivot wavlength in photon units. MODIFICATION HISTORY: Written by Marc W. Buie, Southwest Research Institute, 2021/09/02 based partially on prototype code written by Brian Keeney.