ABA'B' dither pattern

58 views
Skip to first unread message

Irene Shivaei

unread,
Apr 16, 2014, 4:09:50 PM4/16/14
to mosfi...@googlegroups.com
Hi Nick,

I am using DRP latest version (parent: 374:cf601433f89e tip) to reduce spectra with ABA'B' dither pattern. The DRP is working fine with AB pattern, but once I tried it with ABA'B' pattern, in the last step of Rectifying it crashed. The error is

Traceback (most recent call last):
File "Driver.py", line 39, in <module>
waveops)
File "/Users/ireneshivaei/mosfire/mosdrp/MOSFIRE/Rectify.py", line 128, in handle_rectification
shifts = all_shifts[cntr]
IndexError: list index out of range

So, I traced back the error and figured out that when the counter (cntr) is 0 (line 128 in Rectify.py) it's working fine, but it when it adds 1 to it (line 129 in Rectify.py) it doesn't work and gives the error that the index out of range.

With AB pattern, like the test data, the counter is cntr=0, when it's handling plan A-B, and never comes back in the loop with cntr=1. But with ABA'B', after 'Handling plan A-B', it comes back to the loop with cntr = 1 to handle plan Ap-Bp. And this is when the code crashes.

To avoid this, I commented out line 129 ( cntr += 1). Now the DRP is working fine, and the output looks reasonable. The "cntr" variable is not used in any other place.

I thought I should discuss it with you, make sure the change is not affecting anything else. Or maybe I should change something else, instead of commenting out line 129.

Thanks for your help in advance.

Nick Konidaris

unread,
Apr 16, 2014, 4:17:45 PM4/16/14
to mosfi...@googlegroups.com
Hi Irene,

Thank you for reporting this. I think that you are the first user of the "primed" feature (or at least the first one who has emailed us about it). You thus unfortunately bear the burden of untested code.

My first priority is ensuring the pipeline is delivering correct results in AB mode. I think at this point ABA'B' modes do not yet take full advantage of the "primed" positions. To help me, can you send the full output from the Rectify step?

Thanks,
Nick




--
You received this message because you are subscribed to the Google Groups "MOSFIRE Data Reduction PIpeline" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mosfire-drp...@googlegroups.com.
To post to this group, send email to mosfi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mosfire-drp/bc3e826c-2c20-4a06-a0a6-bacbb32a62f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
   +1 831 704 6425

Irene Shivaei

unread,
Apr 16, 2014, 4:31:21 PM4/16/14
to mosfi...@googlegroups.com
Hi Nick,

This is the full output from the Rectifying step:

[---] ireneshivaei% ~/mosfire/mospy Driver.py

::  eps_Offset_1.5.txt.fits

Position -1.5 shift: 0.00 as

::  eps_Offset_-1.2.txt.fits

Position 1.2 shift: 2.70 as

::  eps_Offset_1.2.txt.fits

Position -1.2 shift: 0.30 as

::  eps_Offset_-1.5.txt.fits

Position 1.5 shift: 3.00 as

Handling plan A-B

cntr-before= 0

cntr-after= 1

Handling edge:  n23767

Handling edge:  n21735

Handling edge:  n20802

Handling edge:  n21347

Handling edge:  n21470

Handling edge:  n23207

Handling edge:  o19181

Handling edge:  o18367

Handling edge:  32238

Handling edge:  n20024

Handling edge:  n20212

Handling edge:  n19482

Handling edge:  o17241

Handling edge:  31123

Handling edge:  S28766

Handling edge:  o16847

Handling edge:  n19228

Handling plan Ap-Bp

cntr-before= 1

Traceback (most recent call last):

  File "Driver.py", line 39, in <module>

    waveops)

  File "/Users/ireneshivaei/mosfire/mosdrp/MOSFIRE/Rectify.py", line 129, in handle_rectification

    shifts = all_shifts[cntr]

IndexError: list index out of range


'cntr-before' and 'cntr-after' are print commands that I added to the Rectify.py code, right before line 128 in the original code ( shifts = all_shifts[cntr] ) and after line 129 ( cntr += 1), so that I can trace the 'cntr' value.

Thanks,
Irene.

Nick Konidaris

unread,
Apr 16, 2014, 5:37:21 PM4/16/14
to mosfi...@googlegroups.com
Hi Irene,

I won't have time to look at this for several days at least. It would help if you could try what I suggested and report back.

thanks
nick


On Wed, Apr 16, 2014 at 1:09 PM, Irene Shivaei <irene....@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "MOSFIRE Data Reduction PIpeline" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mosfire-drp...@googlegroups.com.
To post to this group, send email to mosfi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mosfire-drp/bc3e826c-2c20-4a06-a0a6-bacbb32a62f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sshi...@ucr.edu

unread,
Apr 29, 2014, 7:57:24 PM4/29/14
to mosfi...@googlegroups.com
Hi Nick,

I investigated the DRP reduced spectra. The FWHM of the slit star is wider than it should be. I think it might be partly due to the pixels' drift during the observing time, which could be ~ 1 pixel per hour. I guess the DRP is not correcting this offset, is that right?

I looked into this issue in more detail and I have some plots. Let me know if you want to see them, and I will send an email to you.

Best,
Irene.

Nick Konidaris

unread,
Apr 29, 2014, 8:08:13 PM4/29/14
to mosfi...@googlegroups.com
Hi Irene,

Thank you for being diligent and looking into this issue. The DRP can handle this problem via an undocumented feature (undocumented so that when it happens we can send the issue to Keck). I will send you a separate email on how to solve this problem.

The drift is a problem and MOSFIRE simply should not exhibit this behavior. I have taken the liberty of sending another email to MOSFIRE's (excellent) support astronomer (Marc Kassis) as the instrument PIs. We will try to diagnose and fix the root problem.

Best,
Nick



For more options, visit https://groups.google.com/d/optout.

Nick Konidaris

unread,
Jun 11, 2014, 12:29:12 PM6/11/14
to mosfi...@googlegroups.com
Hi Irene,

Based on our offline discussions, the most recent version of the DRP can reduce ABA'B' data without raising an error. Thank you for reporting this bug. The issue in this discussion is closed.

~n
Reply all
Reply to author
Forward
0 new messages