Uploaded image for project: 'DRP 2-D Pipeline'
  1. DRP 2-D Pipeline
  2. PIPE2D-1455

Correct for scattered light in the PFS spectrographs

    Details

    • Type: Story
    • Status: Open (View Workflow)
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Sprint:
      preRun20Jan

      Description

      It has become clear (e.g. PIPE2D-1212) that there is serious scattered light in the PFS spectrographs. Dealing with this is a little tricky, as there is no clean separation between "scattered light" and "the wings of the profiles". Nethertheless, it is possible to think of ways of handling the scattering which don't involve inverting dense 600^2 matrices for every row of the data.

      Let us arbitrarily decompose the full profile P into a core and a scattering component P = C + S. Given some data D which is a realisation of a true (2-D) spectrum M we have D = M(C + S) + epsilon where the product is to be interpreted in Fourier space (or a convolution in pixel space), and epsilon is a noise term. We may then
      trivially write CM = D - SM = D - SD/(C + S).

      If we assume that we can find a model for S which has a lower amplitude than C and is more compact in Fourier space, then we may approximate D - SD/(C + S)) ~ D - SD/C. D/C is an estimate of M ignoring the scattered lights contribution to D. This allows us to subtract the scattered light, leaving an estimate of CM, which we may use to solve for M using only the core profile. It is clear that one could iterate, if desired, using our estimate of M to refine the scattered light correction.

      This procedure is self-consistent, treating the scattering as a part of the total profile (you can think of this procedure as an iterative approach to solving the dense matrix mentioned above on the assumption that it is diagonal dominant).

      Some preliminary results are discussed in scattering.pdf

        Attachments

          Issue Links

            Activity

            Hide
            price price added a comment - - edited

            rhl's prototype is on branch tickets/PIPE2D-1455-rhl.

            Here's an announcement with the initial implementation:

            The scattered light correction is available on drp_stella branch tickets/PIPE2D-1455 (pure python changes).
            Because we want the calexp to include both the CR mask and the scattered light correction, it is no longer produced by the cosmicray (or cosmicray2) task, but by reduceExposure. The cosmicray task now writes a mask product called crMask, and the reduceExposure task applies this to the exposure.
            The scattered light model is currently defined only for r3. The kernel is a double power-law: scale * frac1*(r^2 + soften1^2)**(-0.5*powerLaw1) + frac2*(x^2 + soften2^2)**(-0.5*powerLaw2). The parameters (scale, frac1, soften1, powerLaw1, frac2, soften2, powerLaw2) can be set in the ScatteredLightConfig (the individual parameters are dict\s keyed on the camera, so need to be set in a configuration override file with -C rather than directly on the command-line with -c). Note that the scale is not orthogonal with frac1 and frac2, but ended up there because of different conventions between RHL’s writeup and code; I think it’s helpful, as it allows the user to set the overall amplitude of the scattered light without changing the relative amplitudes of the two components, but we could change to a simpler parameterisation if desired. If the scale is zero (the default, with only r3 overriding) then the scattered light correction is not applied. You can also disable it explicitly by setting reduceExposure:doScatteredLight=False. Besides the reduceExposure task, the scattered light correction is also applied in the fitFiberProfiles.yaml pipeline, which is used to generate the fiber profiles.

            Show
            price price added a comment - - edited rhl 's prototype is on branch tickets/ PIPE2D-1455 -rhl . Here's an announcement with the initial implementation: The scattered light correction is available on drp_stella branch tickets/ PIPE2D-1455 (pure python changes). Because we want the calexp to include both the CR mask and the scattered light correction, it is no longer produced by the cosmicray (or cosmicray2 ) task, but by reduceExposure . The cosmicray task now writes a mask product called crMask , and the reduceExposure task applies this to the exposure. The scattered light model is currently defined only for r3 . The kernel is a double power-law: scale * frac1*(r^2 + soften1^2)**(-0.5*powerLaw1) + frac2*(x^2 + soften2^2)**(-0.5*powerLaw2) . The parameters ( scale, frac1, soften1, powerLaw1, frac2, soften2, powerLaw2 ) can be set in the ScatteredLightConfig (the individual parameters are dict \s keyed on the camera, so need to be set in a configuration override file with -C rather than directly on the command-line with -c ). Note that the scale is not orthogonal with frac1 and frac2 , but ended up there because of different conventions between RHL’s writeup and code; I think it’s helpful, as it allows the user to set the overall amplitude of the scattered light without changing the relative amplitudes of the two components, but we could change to a simpler parameterisation if desired. If the scale is zero (the default, with only r3 overriding) then the scattered light correction is not applied. You can also disable it explicitly by setting reduceExposure:doScatteredLight=False . Besides the reduceExposure task, the scattered light correction is also applied in the fitFiberProfiles.yaml pipeline, which is used to generate the fiber profiles.

              People

              • Assignee:
                rhl rhl
                Reporter:
                rhl rhl
              • Votes:
                0 Vote for this issue
                Watchers:
                Start watching this issue

                Dates

                • Created:
                  Updated: