Date: Fri, 29 Mar 2024 14:48:18 +0000 (UTC) Message-ID: <1474990746.21908.1711723703664@confluence> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_21907_152424150.1711723698651" ------=_Part_21907_152424150.1711723698651 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Since the stack documentation and tutorials are incomplete and i= n transition, I'm putting the things I've learned about using the stack her= e. Please feel free to add your own "tips and tricks". DN.
Use --show to list the subtasks of a CmdLineTask
processCcdDecam.py /home/afausti/bulge/input --show tasks
then use the --loglevel to set the DEBUG log level when executing the task<=
/p>
processCcdDecam.py /home/afausti/bulge/input/ --output /home/afausti/bul= ge/output --id visit=3D0205484 ccdnum=3D1 --loglevel processCcdDecam.calibr= ate.astrometry=3DDEBUG
NOTE: the --show does not include the CmdLineTak as par= t of the subtask name (in this case processCcdDecam) but it must be i= ncluded in --loglevel (as above)
Once you have an afwTable loaded, such as the source table produced by p= rocessCcd
>>> import lsst.afw.table as afwTable>>> import lsst.daf.persistence as dafPersist>>> butler =3D dafPersist.Butler("/data/lsst/decam/redux/cp/c= osmos/")>>> sourceCat =3D butler.get('src',visit=3D177341,ccdnum=3D31= )You can access the data in the f= ile by using the column name
>>> print sourceCat["slot_Centroid_x"][ 7. 84. 582. ..., 1764. = 1964. 1331.]
You can also modify any of the individual values
>>> sourceCat["slot_Centroid_x"][0:10] +=3D 10.0
or all the values
>>> sourceCat["slot_Centroid_x"][:] +=3D 10.0
Here's how to get the full schema and all the column names,
>>> sourceCat.getSchema()Schema((Field['L'](name=3D"id", doc=3D"unique ID"), Key<L>= ;(offset=3D0, nElements=3D1)),(Field['Angle'](name=3D"coord_ra", doc=3D"position in ra= /dec"), Key<Angle>(offset=3D8, nElements=3D1)),
.... many more lines ...
You can also use the "get()" method with the column names,
>>> sourceCat.get("slot_Centroid_x")array([ 7., 84., 582., ..., 176= 4., 1964., 1331.])>>> sourceCat.get("slot_Centroid_x")[0]7.0
There are many different pixel centroid values in the source tables (e.g= ., deblend_psfCenter_x/y, = ;base_GaussianCentroid_x/y, base_NaiveCentroid_x/y, base_SdssCent= roid_x/y). The "offici= al" one that is used by the stack routines is "slot_Centroid_x/y" which is = actually a link to another field (most of the time "base_SdssCentroid_x/y").
Some other useful columns are "c= oord_ra", "coord_dec" (NOTE these are in RADIANS), "slot_PsfFlux" (also a l= ink to another column), "slot_Shape_xx/xy/yy" (another link).