[PIPE2D-90] Create Calib Task to create and write FiberTraces Created: 30/Sep/16  Updated: 11/Oct/16  Resolved: 11/Oct/16

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

Type: Story Priority: Major
Reporter: aritter Assignee: aritter
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks PIPE2D-80 Task-ify code for creating normalized... Done
blocks PIPE2D-10 Flat field the data Done
Relates
relates to PIPE2D-98 Add test to confirm that a FiberTrace... Done
Story Points: 2
Epic Link: persistable-fibertrace
Sprint: 2014-16
Reviewers: rhl

 Description   

Please write a Calib Task to create and write FiberTraces. Currently the 'Flat' used for the FiberTrace creation is read from the pipeline output CALIB/FLAT. The new task ConstructNormFlat now writes the CALIB/FLAT which cannot be used anymore to trace the apertures, so we need a new task to create the FiberTraces starting with raw Flats (xOffset=0.0).



 Comments   
Comment by swinbank [ 05/Oct/16 ]

Is it necessary to expand the scope of the current sprint to include this? If possible, we should try to finish the tickets we have in play before we move on to anything else.

Comment by aritter [ 05/Oct/16 ]

PIPE2D-80 broke the existing code for tracing the apertures. Before we can merge PIPE2D-80 into master we need to make the FiberTraceSets persistable and change the existing code to include this

Comment by swinbank [ 05/Oct/16 ]

Ok, thanks for clarifying.

Comment by aritter [ 10/Oct/16 ]

See obs_pfs and drp_stella tickets/PIPE2D-90.
Quick-start guide has been updated to include constructFiberTrace.
Once this ticket is reviewed and merged with master I will rebase PIPE2D-48, PIPE2D-80, and PIPE2D-77 on master and put them in review as well.

Comment by rhl [ 10/Oct/16 ]

The instructions include the line

      constructFiberTrace.py /Users/azuri/spectra/pfs/PFS --rerun azuri/tmp --id field=FLAT dateObs=2015-12-22 arm=r spectrograph=2 --calibId calibDate=2015-12-22 arm=r spectrograph=2 visit=4

This is inconsistent with the other entries in the file. Do we also need to ingest the fibreTraces?

Also, why do you specify field=FLAT not an explicit visit number, and why is the visit in the calibId?

Comment by rhl [ 10/Oct/16 ]

Is constructFiberTrace pushed to PIPE2D-90?

$ git pull
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From github.com:Subaru-PFS/drp_stella
   fdcf7c9..20927fb  master     -> origin/master
Current branch tickets/PIPE2D-90 is up to date.
$ find . -name constructFiberTrace.py
$ 
Comment by aritter [ 10/Oct/16 ]

It's in obs_pfs. (RHL adds: how did I miss that??)

Trying to test the line in the quick-start guide now. 'visit' definitely needs to be replaced with 'calibVersion' since Friday. Fixed the path to $PFS_DATA

Comment by rhl [ 10/Oct/16 ]

Did you push the data model changes? I don't see a tickets/PIPE2D-90 branch, and I don't see a ticket for this change to the data model.

You didn't reply to my question about ingestion; it seems inconsistent with the other calibration products like flats not to need to ingest the fiberTraces.

Comment by aritter [ 10/Oct/16 ]

Fixed the command in the quick-start guide and tested it. You're right - pfsFiberTraces do need to get ingested into the CALIB database. I replaced field=Flat with visit=5 to be consistent with the previous line reduceFlat...
Sorry, the datamodel changes are in PIPE2D-68. Should have mentioned that...

Comment by rhl [ 10/Oct/16 ]

Hmm. Don't I need to specify calibVersion=fiberTrace in the --calibId? And if I add that I get
{{
File "/Users/rhl/LSST/obs/pfs/python/lsst/obs/pfs/pfsMapper.py", line 97, in map
location = super(PfsMapper, self).map(datasetType, copyId, write=write)
File "/Users/lsst/products/DarwinX86/miniconda/latest/envs/lsst-v12_1/opt/lsst/daf_persistence/python/lsst/daf/persistence/mapper.py", line 172, in map
func = getattr(self, 'map_' + datasetType)
AttributeError: 'PfsMapper' object has no attribute 'map_linearizer'
}}

That's
{{
$ cd /Users/rhl/LSST/obs/pfs
$ git pull
Current branch tickets/PIPE2D-90 is up to date.
}}
so I think I have the right mapper.

Can you modify the runDemo script that I sent you and confirm that it works?

Also, I'm surprised to see that it uses `parseAndRun()` not `parseAndSubmit()` like the other tasks (e.g. reduceBias.py). Can you explain?

Comment by aritter [ 10/Oct/16 ]

Please pull drp_stella and obs_pfs again (just did some changes). The 'map_linearizer' error normally shows up when the 'config.isr.doLinearize = False' is commented out what I only see in obs_pfs/config/pfs/dark.py.
I replaced 'parseAndRun()' with 'parseAndSubmit()' so now the parameter '--cores 1' needed to get added to the command line for constructFiberTrace... (change pushed in drp_stella)

Comment by rhl [ 11/Oct/16 ]

I was unable to confirm that the code is correct (as the full processing relies on PIPE2D-48) but it does run! I'm passing this review for now, but we need to confirm that it's doing the right thing as part of the PIPE2D-48 review.

Comment by aritter [ 11/Oct/16 ]

Created issue to write test for pfsFiberTrace (PIPE2D-98). Merged into master

Generated at Sat Feb 10 15:48:20 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.