For the CIRPASS IFU the fiber-to-lens map is contained in a binary table in the files.

0ngc1140_1bftf ngc1140_4645_c1_000.f
2IMAGE SCI 1 1024x508 -32
3IMAGE VAR 1 1024x508 -32
4IMAGE DQ 1 1024x508 -32
5IMAGE TIME1 1024x508 -32

Depending on if the image has been mosaiced or not it should look something like BINTABLE.txt which was read form the .fits file with

!rm BINTABLE.txt
tdump[1] > BINTABLE.txt

The table contains four columns; FibreID, xcord, ycord and apnum. ID and apnum are generally identical in the current format IFU. Apnum gives the order of the spectra in the file (starting at 1 NOT 0). xcord and ycord predictably give the x/y [position of the lense in the IFU. The current (2002) lense map is found here. A more detailed description of the interpretation of x/y positions is contained in Andrew Deans PhD thesis, more information will be added here soon.

The main potential error associated with using this file is in handling calibration fibers and missing lenses. There are 10 entries in the table for calibration fibers which appear on the slit (and in processed images which have not been mosaiced) but which have no lense in the IFU and hence have xcord/ycord=-999. There is also a broken lense in the IFU. This lense has no fiber attached and hence no entry in the spectral image ([sci,1]) BUT the lense x/y coordinate in the IFU are still recorded in the Table. This lense (sitting between lenses 359 and 360) can be identified in the table by it's FibreID=-999 and apnum=-999. The corollary of all this is that apnum in the table extension corresponds to the apnum in the (counting starting at 1 NOT 0). Line N in the table extension does not usually correspond to spectrum N'th in the spectral image.

Once multiple dithers have been mosaiced the dead lense and the calibration fibers are removed form the image and the table extension is updated to reflect the new fiber to lense map.