[INFRA-36] Write quick-start guide for Stella Created: 02/Jul/16 Updated: 10/Sep/16 Resolved: 10/Sep/16 |
|
| Status: | Done |
| Project: | Software Development Infrastructure |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Major |
| Reporter: | swinbank | Assignee: | aritter |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Story Points: | 2 | ||||||||
| Epic Link: | drp-docs | ||||||||
| Sprint: | 2014-14, 2014-15, 2014-16 | ||||||||
| Reviewers: | swinbank | ||||||||
| Description |
|
Provide a document that describes how to install, test and start using Stella. It should be checked in to a git repository. Detailed formatting is not important for this purpose: it should be clear, but whether it's plain text, Doxygen, reStructuredText, LaTeX or something else is immaterial at this stage. Focus on content. |
| Comments |
| Comment by aritter [ 06/Jul/16 ] |
|
What type of installation should be performed for lsst? binary, from source, lsstsw,...? |
| Comment by swinbank [ 06/Jul/16 ] |
|
I'd think that eups distrib install would be a good starting point. |
| Comment by aritter [ 19/Jul/16 ] |
|
Should I add Biases and Darks to drp_stella_data so people can test all commands in the quick-start guide? Here is what I have now: ====================================
conda install matplotlib
mkdir ~/stella-git
git clone https://github.com/Subaru-PFS/drp_stella.git
eups distrib install eigen 3.2.5.lsst2
eups declare obs_pfs 1.0 -c -f Linux64 -r ~/stella-git/drp_stella
setup drp_stella 1.0 -v
cd drp_stella
cd ../obs_pfs
mkdir ~/spectra/PFS
cd ~/spectra
reduceBias.py 'PFS' --calib 'PFS/CALIB' --output 'PFS' --calibId calibVersion=bias arm=r calibDate=2015-12-22 spectrograph=2 --do-exec --id field=BIAS dateObs=2015-12-22 --clobber-config --nodes=1
genCalibRegistry.py --root='PFS/CALIB' --camera PFS --validity 180
reduceDark.py 'PFS' --calib 'PFS/CALIB' --output 'PFS' --calibId calibVersion=dark arm=r calibDate=2015-12-22 spectrograph=2 --do-exec --id field=DARK dateObs=2015-12-22 --nodes=1 --procs=1 -C ~/stella-git/obs_pfs/config/pfs/dark.py
reduceFlat.py 'PFS' --calib 'PFS/CALIB' --calibId calibVersion=flat arm=r calibDate=2015-12-22 filter=r spectrograph=2 --do-exec --id field=FLAT arm=r dateObs=2015-12-22 spectrograph=2 --loglevel 'info' --config isr.doBias='True' isr.doDark='True' isr.doLinearize=False --output 'PFS' --nodes=1 --procs=1 --clobber-config genCalibRegistry.py --root='PFS/CALIB' --camera PFS --validity 180
detrend.py 'PFS' --calib='PFS/CALIB' --id arm=‘r’ spectrograph=2 dateObs='2015-12-22' field='ARC' -C ~/stella-git/obs_pfs/config/pfs/detrend.py --output 'PFS'
reduceArc.py 'PFS' --id visit=4 --wLenFile $OBS_PFS_DIR'/pfs/RedFiberPixels.fits.gz' --lineList $OBS_PFS_DIR'/pfs/lineLists/CdHgKrNeXe_red.fits' --loglevel 'info' --calib 'PFS/CALIB/' --output 'PFS' |
| Comment by aritter [ 29/Jul/16 ] |
|
Added quick-start guide to drp_stella/doc/quick-start_guide.text in tickets/ |
| Comment by swinbank [ 30/Jul/16 ] |
|
Looks like something went wrong here: the most recent commit to tickets/ |
| Comment by swinbank [ 30/Jul/16 ] |
|
Putting this back in progress until there's something to review! |
| Comment by aritter [ 30/Jul/16 ] |
|
Made sure that install.text is now in drp_stella/doc/install.text (tickets/ |
| Comment by swinbank [ 08/Aug/16 ] |
|
I've left a number of comments on the pull request. The brief summary is that the installation instructions seem basically fine, although I've made a few suggestions for places where they could be simplified or clarified. The demo reduction confused me for quite a while until I figured out that the data in drp_stella_data doesn't actually correspond to your example command lines: you keep referring to arm=r spectrograph=2, but the data seems to be from arm=n spectrograph=1. Even once I'd got that figured out, the final reduceArc.py command fails because it has a hard-coded path referring to your home directory in it. More generally, I'm a bit worried about the level of the demo documentation. What is your intended audience for this? It seems to go into a lot of detail in some places (e.g. suggesting that users might want to inspect the registry database with a SQLite browser) but to skim over the top of what you're actually doing and why. A paragraph or two of more introductory material might help, as would cutting out all the complexity related to how tasks are constructed and run. For example, why do you use both config override files and command line options? why use --clobber-config? None of this seems relevant to somebody who simply wants to start processing PFS data as quickly as possible. |
| Comment by rhl [ 11/Aug/16 ] |
|
Please make this 7-bit clean; the line
should read
|
| Comment by rhl [ 11/Aug/16 ] |
|
Here is an annotated version of install.tst; my comments start with RHL
|
| Comment by rhl [ 12/Aug/16 ] |
|
Here's an update to that document with new comments noted as RHL2. Andreas has addressed some of these (and some of the RHLs too), but I haven't removed the older comments.
|
| Comment by swinbank [ 12/Aug/16 ] |
|
Lots of the above commentary is useful, and should be mined for tickets both for here and for the LSST stack. However, we should avoid scope creep here: it's not necessary to fix all the above in order for this document to be useful. Obviously, it is necessary to correct any errors in this text before we can proceed. One thing that jumped out:
As I recall, the aim here is to avoid ABI incompatibilities since (on Linux, at least) all the Anaconda packages were compiled with gcc 4.small and are incompatible with a modern versions. We should check what the situation is on OSX. |
| Comment by rhl [ 12/Aug/16 ] |
|
I agree with John. Essentially all of my comments need to be addressed, but not all as part of this ticket. Please file tickets as appropriate (e.g. the calibId things are clearly not part of Another example is that
should not have been addressed on this ticket. |
| Comment by aritter [ 19/Aug/16 ] |
|
Here is my response to RHL's comments: The following notes should allow you to install the LSST stack and the PFS DRP.
After the installation procedure example commands are given to show you how to
use the pipeline. The commands have been tested on an Arch Linux machine as well
as on Mac OS X. AR Done • Install git-lfs (https://git-lfs.github.com/) AR Removed matplotlib from the list of packages to be installed and explained why for Linux
conda install matplotlib gcc AR Changed to $HOME, removed the quotes RHL That suggested directory name "stella-git" is not all that helpful – the fact that
AR Changed to $HOME/PFS (e.g. export DRP_STELLA="~/stella-git")
mkdir -p $DRP_STELLA
cd $DRP_STELLA AR Done
eups distrib install eigen 3.2.5.lsst2 AR See below eups declare obs_pfs 0.1 -c -r $DRP_STELLA/obs_pfs
eups declare drp_stella_data 0.1 -c -r $DRP_STELLA/drp_stella_data
eups declare drp_stella 0.1 -c -r $DRP_STELLA/drp_stella AR Removed AR Removed declarations, now using setup -r . RHL In fact, I think that the order matters.
AR Didn’t need to setup and build obs_pfs first as setting up drp_stella automatically setup obs_pfs.
RHL obs_pfs generates lots of chatter (e.g. AR Filed tickets for that.
RHL And don't you need a more recent sconsUtils and a --filterWarn flag to deal with warnings about typemaps?
AR Included installation of a recent sconsUtils and a —filterWarn flag in the quick-start guide cd $DRP_STELLA/drp_stella
scons opt=3
cd ../obs_pfs
scons opt=3 AR Ticket filed ( RHL tests/FiberTraces.py generates 1217 lines of chatter, and Spectra.py 615. Where is it coming from? Most of it looks
AR Ticket filed ( RHL tests/testDrp.py fails without returning an error code. It's due to the os/x 10.11 SIP stuff I assume,
AR Ticket filed ( RHL Not setting up drp_pipeline_data says, "Nothing to be done for tests"; it should at least print a warning, AR I’m pretty sure this is LSST • Now for using the pipeline. Raw test data are in $DRP_STELLA_DATA_DIR/tests/data/raw/ (3 Biases, 3 Darks, 1 Flat, 1 Arc).
AR Well, we don’t really, but I would want to know what kind of raw data we have…
First we need to create a directory (actually 2) where we want to store pipeline outputs.
Let's assume you want to store the pipeline outputs in a directory ~/spectra/PFS:
AR Explanation added export SPECTRA_DIR="~/spectra/PFS"
mkdir -p $SPECTRA_DIR/CALIB AR Explanation added RHL2 Have you demonstrated using a raw filesystem with no ingestion? It should work AR Craig asked Paul about that, waiting for an answer echo "lsst.obs.pfs.PfsMapper" > $SPECTRA_DIR/_mapper AR Well it’s a quick-start guide and I think that this is very helpful information for understanding how to set parameters for tasks. • To ingest the raw images: AR Removed cd and specified the output
RHL2 Actually, why do you need to specify --output at all?
AR Replaced —output with —rerun
RHL2 I think you want
AR Changed RHL2 And please explain the meaning of "--mode link" AR Done
RHL2 Probably it would be better to move some of your info logging up to debug; the default logging
AR Ticket filed ( cd $SPECTRA_DIR
ingestImages.py . $DRP_STELLA_DATA_DIR/tests/data/raw/*.fits --output . --mode link AR Explanation added
Note the 2 config parameters --nodes and --procs at the end. These parameters are required by tasks which are
parallelized. Sometimes running the code in parallel can lead to problems (in most cases caused by the 3rd-party
libraries used), so setting nodes and procs to 1 is a safe choice.
AR Asked on HipChat, waiting for Craig to help me getting to the bottom of it RHL What are the default values of nodes and procs?
AR Asked Paul about it, waiting for answer reduceBias.py . --calib CALIB --output . --calibId calibVersion=bias arm=r calibDate=2015-12-22 spectrograph=2 --do-exec --id field=BIAS dateObs=2015-12-22 --nodes 1 --procs 1 AR Removed —calib CALIB
RHL2 Why do I need to specify the output? AR Ticket filed (
RHL2 If I omit the --calibId I get the error message
: No registry for lookup
AR Gonna investigate (ask Paul). Filed ticket ( RHL2 There is no check for a mis-formed date (e.g. 2015-99-22) AR Asked Paul about it, waiting for answer RHL2 Where is "bias.isr: Set 0 BAD pixels to 0.01" coming from? What does it mean? AR Comes from obs_subaru isr.py setBadRegions(self, exposure) RHL2 How about ": Empty WCS extension, using FITS header" AR These warnings normally come from creating an exposure from a fits file via ExposureF(fileName) • Now that we have a master bias we need to ingest that too into our database: AR Explanation added. AR Done • Now we can create a bias-subtracted Dark and ingest that into our database:
AR Added trimmed, scaled, and master
RHL and isn't this a different database? And do you mean database AR Changed “database” to “calibration registry”. RHL2 All comments for bias generation apply here.
AR Changed order or arguments
reduceDark.py . --calib CALIB --output . --calibId calibVersion=dark arm=r calibDate=2015-12-22 spectrograph=2 --do-exec --id field=DARK dateObs=2015-12-22 --nodes 1 --procs 1 AR Done
genCalibRegistry.py --root CALIB --camera PFS --validity 180 AR Comment added RHL What does the --calib CALIB option mean; is it --CALIB ./CALIB? Does it default? AR Removed —calib CALIB option RHL2 All comments for bias generation apply here.
AR Removed filter=r
reduceFlat.py . --calib CALIB --calibId calibVersion=flat arm=r calibDate=2015-12-22 filter=r spectrograph=2 --do-exec --id field=FLAT arm=r dateObs=2015-12-22 spectrograph=2 --output . --nodes 1 --procs 1
genCalibRegistry.py --root=CALIB --camera PFS --validity 180 AR Using —rerun now RHL Do I need to specify all those flags? AR Changed flags to visit=5 RHL2 What does detrend.py do? AR Comment added RHL2 We should note that it doesn't (yet) flat field AR Done RHL2 Why the "type(config)" lines? AR Removed “type(config)” lines from camera.py RHL2 Why specify --calib CALIB? AR Removed —calib CALIB RHL2 Why are we doing this in two steps (detrend.py and reduceArc.py)? AR Ticket filed (
RHL2 If we are only processing one arc, why specify it this way, not by visit, e.g.
AR Replaced “arm=r spectrograph=2 dateObs=2015-12-22 field=ARC” with “visit=4”, added comment on how to reduce all Arcs RHL2 What files are produced? AR See next line • We now have the postISRCCD images and can extract and wavelength-calibrate our CdHgKrNeXe Arc with the visit
number 4: AR Removed wLenFile and lineList as they are defaulted. Ticket filed (
reduceArc.py . --output . --calib CALIB --id visit=4 --wLenFile $OBS_PFS_DIR/pfs/RedFiberPixels.fits.gz --lineList $OBS_PFS_DIR/pfs/lineLists/CdHgKrNeXe_red.fits AR Filed individual tickets |
| Comment by aritter [ 19/Aug/16 ] |
|
See tickets/ |
| Comment by swinbank [ 27/Aug/16 ] |
|
Thanks for taking the time to respond to all those comments in detail. I've added a few more to the drp_stella PR (and I see rhl has done the same). They're mostly fairly minor, though: I don't think they'll take long, and they'll help make things a bit clearer. After resolving them, my suggestion would be that we go ahead and merge this to master as "good enough for now", but continue to evolve and improve this document by filing tickets as we spot things that needs improving. A couple of other points:
|