[PIPE2D-297] Split ReferenceLine, Spectrum, SpectrumSet into their own files Created: 18/Oct/18  Updated: 25/Oct/18  Resolved: 25/Oct/18

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

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

Reviewers: hassan

 Description   

The ReferenceLine, Spectrum and SpectrumSet classes are defined in the same files (same C++ header, pybind wrapper, python extension). They should be split into files named after themselves.



 Comments   
Comment by price [ 19/Oct/18 ]

Not sure it's worth reviewing this in detail, as it's just reorganisation.

price@Pauls-MacBook-Pro:~/pfs/drp_stella (tickets/PIPE2D-297=) $ git sub
commit c2dabbf10ddd36708ad64a0592e86fc0fafce4ce
Author: Paul Price <price@astro.princeton.edu>
Date:   Wed Oct 17 17:09:18 2018 -0400

    pull ReferenceLine,Spectrum,SpectrumSet into their own files
    
    Until now, they've been mixed up in the same file.
    Reorganising them into their own files, named after themselves, makes
    them easier to find.

 include/pfs/drp/stella/FiberTraces.h               |   2 +-
 include/pfs/drp/stella/ReferenceLine.h             |  48 ++++
 include/pfs/drp/stella/Spectra.h                   | 305 ---------------------
 include/pfs/drp/stella/Spectrum.h                  | 163 +++++++++++
 include/pfs/drp/stella/SpectrumSet.h               | 119 ++++++++
 python/pfs/drp/stella/ReferenceLine.cc             |  66 +++++
 python/pfs/drp/stella/SConscript                   |   4 +-
 python/pfs/drp/stella/{spectra.cc => Spectrum.cc}  |  89 +-----
 python/pfs/drp/stella/SpectrumContinued.py         | 147 ++++++++++
 python/pfs/drp/stella/SpectrumSet.cc               |  59 ++++
 ...spectraContinued.py => SpectrumSetContinued.py} | 147 +---------
 python/pfs/drp/stella/__init__.py                  |   5 +-
 python/pfs/drp/stella/fiberTracesContinued.py      |   2 +-
 python/pfs/drp/stella/tests/__init__.py            |   1 +
 python/pfs/drp/stella/tests/base.py                |  73 +++++
 src/{Spectra.cc => Spectrum.cc}                    |  95 +------
 src/SpectrumSet.cc                                 |  92 +++++++
 tests/test_ReferenceLine.py                        |  44 +++
 tests/test_Spectrum.py                             | 257 +----------------
 tests/test_SpectrumSet.py                          | 204 ++++++++++++++
 20 files changed, 1038 insertions(+), 884 deletions(-)

commit b63edd1cbe642cd0287c06079b1ade503f0f7219 (HEAD -> tickets/PIPE2D-297, origin/tickets/PIPE2D-297)
Author: Paul Price <price@astro.princeton.edu>
Date:   Wed Oct 17 17:45:18 2018 -0400

    pull FiberTrace,FiberTraceSet into their own files
    
    Until now, they have often been mixed up in the same files.
    Reorganising them into their own files, named after themselves, makes
    them easier to find.

 include/pfs/drp/stella/FiberTrace.h                | 125 +++++++++++++++++++++
 .../drp/stella/{FiberTraces.h => FiberTraceSet.h}  | 123 +-------------------
 .../pfs/drp/stella/math/findAndTraceApertures.h    |   2 +-
 python/pfs/drp/stella/FiberTrace.cc                |  66 +++++++++++
 python/pfs/drp/stella/FiberTraceContinued.py       |  23 ++++
 .../stella/{fiberTraces.cc => FiberTraceSet.cc}    |  52 +--------
 ...racesContinued.py => FiberTraceSetContinued.py} |  23 +---
 python/pfs/drp/stella/SConscript                   |   3 +-
 python/pfs/drp/stella/__init__.py                  |   6 +-
 src/{FiberTraces.cc => FiberTrace.cc}              |  39 +------
 src/FiberTraceSet.cc                               |  49 ++++++++
 src/math/findAndTraceApertures.cc                  |   1 +
 12 files changed, 284 insertions(+), 228 deletions(-)
Comment by price [ 25/Oct/18 ]

hassan writes:

it looks fine for me and as you say does not warrant a review. So whenever the build succeeds, merge it to master.

The build passed; merged to master.

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