[SIM2D-109] Refactor code such that PfsConfigs are not dark/flat/science specific Created: 08/Mar/19  Updated: 05/Apr/19  Resolved: 05/Apr/19

Status: Done
Project: DRP 2-D Simulator
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: hassan Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to SIM2D-94 Simulator should accept a PfsConfig i... Done
Story Points: 4
Sprint: 2DDRP-2019 C
Reviewers: cloomis

 Description   

Following SIM2D-94 it was noticed that there is code in makePfsConfig.py to make flat or dark-specific PfsConfig s.

As cloomis had remarked in PR #3 for the above issue:

I do not think that pfsConfig can or should hold any information about what light goes through a fiber by declaring makeFlatConfig, makeDarkConfig, etc. The design tells where the cobras are pointed (which can be behind a spot), but that same config is used for taking darks, arcs, flats, and science exposures.

Please make the generated pfsConfigs independent of flats, darks or science.



 Comments   
Comment by rhl [ 08/Mar/19 ]

I can imagine a flag in the pfsDesign to say if a fibre is behind a spot.

Comment by price [ 20/Mar/19 ]

cloomis, would you please have a look?

price@MacBook:~/pfs/drp_instmodel (tickets/SIM2D-109=) $ git sub
commit 7c1ffeb8b9c19cc7339dd806c0449efb4786118f
Author: Paul Price <price@astro.princeton.edu>
Date:   Tue Mar 19 12:29:56 2019 -0400

    convert to pfsDesign+light source as specifying spectra
    
    I was using the pfsDesign to specify the spectra, even for arcs and darks,
    but the pfsDesign should only specify the top-end configuration, and the
    light source (sky vs quartz vs arc vs dark) should be separate. This allows
    us to dispense with the field definitions.

 bin/makeSimRun                           |  79 ++++-----
 python/pfs/instmodel/fieldDefinitions.py |  87 ----------
 python/pfs/instmodel/lightSource.py      | 288 +++++++++++++++++++++++++++++++
 python/pfs/instmodel/makePfiDesign.py    |  64 ++++---
 python/pfs/instmodel/makePfsConfig.py    | 169 +-----------------
 python/pfs/instmodel/makeSim.py          |  38 ++--
 python/pfs/instmodel/spectrumLibrary.py  | 122 -------------
 7 files changed, 383 insertions(+), 464 deletions(-)

commit 53e348f6a3b392ceb2f72606c2a85d51e14bad05 (HEAD -> tickets/SIM2D-109, origin/tickets/SIM2D-109)
Author: Paul Price <price@astro.princeton.edu>
Date:   Tue Mar 19 15:28:35 2019 -0400

    add SumSpectrum
    
    Not using it yet, but it might be useful down the road.

 python/pfs/instmodel/spectrum.py | 45 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
Comment by hassan [ 05/Apr/19 ]

cloomis has commented on pull request and is happy with the changes.

Comment by price [ 05/Apr/19 ]

Created SIM2D-116 to clean up the arguments, as cloomis suggested.

Comment by price [ 05/Apr/19 ]

Merged to master.

Generated at Sat Feb 10 16:08:40 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.