Cube Wave line to pixel
with the latest 1.1.11 version of mpdaf, i get this
In [28]: o3cube.wave.pixel(0.788,nearest=False) Out[28]: 66.000000000000455
In [29]: o3cube.wave.pixel(0.788,nearest=True) Out[29]: 60
which seems not the appropriate behavior. Here is the file header:
SIMPLE = T / Written by IDL: Thu Oct 2 15:56:52 2014
BITPIX = -64 / array data type
NAXIS = 3 / number of array dimensions
NAXIS1 = 41 /Number of positions along axis 1
NAXIS2 = 41 /Number of positions along axis 2
NAXIS3 = 61 /Number of positions along axis 3
EXTNAME = 'DATA ' / extension name
HDUCLASS= 'ESO ' / class name (ESO format)
HDUDOC = 'DICD ' / document with class description
HDUVERS = 'DICD version 6' / version number (according to spec v2.5.1)
HDUCLAS1= 'IMAGE ' / Image data format
HDUCLAS2= 'DATA ' / this extension contains the data itself
ERRDATA = 'STAT ' / pointer to the variance extension
OBJECT = 'HDFS (DATA)'
BUNIT = '10**(-20)*erg/s/cm**2/Angstrom' / data unit type
CRPIX1 = 40.0000 / Pixel coordinate of reference point
CRPIX2 = 145.000 / Pixel coordinate of reference point
CUNIT1 = 'deg ' / Units of coordinate increment and value
CUNIT2 = 'deg ' / Units of coordinate increment and value
CTYPE1 = 'RA---TAN' / Right ascension, gnomonic projection
CTYPE2 = 'DEC--TAN' / Declination, gnomonic projection
CSYER1 = 1.51033062781E-05 / [deg] Systematic error in coordinate
CSYER2 = 5.76768648658E-06 / [deg] Systematic error in coordinate
CRVAL1 = 338.231431707 / [deg] Coordinate value at reference point
CRVAL2 = -60.5636783794 / [deg] Coordinate value at reference point
CTYPE3 = 'LINEAR ' / world coordinate type
CUNIT3 = 'microns ' / world coordinate units
CD3_3 = 0.000125
CRPIX3 = -2437.00 / Start in pixel
CRVAL3 = 0.475 / Start in world coordinate
CD1_3 = 0.0
CD2_3 = 0.0
CD3_1 = 0.0
CD3_2 = 0.0
CDELT3 = 0.000125 / Step in world coordinate