Data Reduction Frequently Asked Questions

I have to combine N exposures, but some of them show a rotation offset with respect to the others. How can I solve this issue?

 

In rare cases, the real orientation of the exposure differs from what stated in the header because of some issue with the rotator encoders. The MUSE pipeline does not correct for rotation offsets, therefore it is necessary to change the information in the header of the exposures affected by this problem.
First, one needs to compare the IMAGE_FOV of the exposures to combine, in order to identify those with the wrong orientation and to measure the rotation offset. Then, one has to modify the keywords HIERARCH ESO ADA POSANG and HIERARCH ESO INS DROT POSANG in the primary header of the problematic exposures by adding the offset. A positive offset rotates the exposures counter-clockwise. We include here an example of a simple python script that can be used to rotate counter-clock wise an input.fits frame by 5 degrees and generate the correct output.fits

  import astropy
  from astropy.io import fits
  rot_offset = 5.   #positive angles rotates counter-clockwise.

  hdr = fits.open('input.fits','update')
  ada =  hdr[0].header['HIERARCH ESO ADA POSANG']
  hdr[0].header['HIERARCH ESO ADA POSANG'] = ada + rot_offset
  ins = hdr[0].header['HIERARCH ESO INS DROT POSANG']
  hdr[0].header['HIERARCH ESO INS DROT POSANG'] = ins + rot_offset
  hdr.writeto('output.fits',clobber='True')



The output.fits has to be used instead of the raw input.fits in the data reduction.