Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-13877

Write task that computes single consolidated QA table for whole tract

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Story Points:
      4
    • Team:
      Data Release Production

      Description

      In the spirit of disentangling computations from visualizations in the interactive QA framework of qa_explorer, write a task to compute columns of all quantities desired for pipe_analysis-style plots.  This should use the new object table parquet files (deepCoadd_obj dataset) generated by writeObjectTable.py to do computations on whole tracts of data at a time.

        Attachments

          Activity

          Hide
          tmorton Tim Morton [X] (Inactive) added a comment - - edited

          The following works for me now:

          writeObjectTable.py  /datasets/hsc/repo/rerun/RC/w_2018_14/DM-13890/ --output /project/tmorton/DM-13877 --id tract=9615 filter=HSC-G^HSC-R --no-versions -j 18
          writeQATable.py /project/tmorton/DM-13877 --output /project/tmorton/DM-13877 --id tract=9615  --no-versions -j 20
          consolidateQATable.py /project/tmorton/DM-13877 --output /project/tmorton/DM-13877 --id tract=9615  --no-versions
          

          These tasks all use the new ParquetStorage to write and read (sometimes partial) dataframes, mediated by the ParquetTable and/or MultilevelParquetTable objects. WriteQATableTask also uses a YAML specification of what functors to calculate for the QA table. In principle this can be made configurable, but this is just a demo for now.

          Up next will be to connect this new tract-level dataset to the QADataset object to enable visualizations on top of these calculations.

          Show
          tmorton Tim Morton [X] (Inactive) added a comment - - edited The following works for me now: writeObjectTable.py /datasets/hsc/repo/rerun/RC/w_2018_14/DM-13890/ --output /project/tmorton/DM-13877 --id tract=9615 filter=HSC-G^HSC-R --no-versions -j 18 writeQATable.py /project/tmorton/DM-13877 --output /project/tmorton/DM-13877 --id tract=9615 --no-versions -j 20 consolidateQATable.py /project/tmorton/DM-13877 --output /project/tmorton/DM-13877 --id tract=9615 --no-versions These tasks all use the new ParquetStorage to write and read (sometimes partial) dataframes, mediated by the ParquetTable and/or MultilevelParquetTable objects. WriteQATableTask also uses a YAML specification of what functors to calculate for the QA table. In principle this can be made configurable, but this is just a demo for now. Up next will be to connect this new tract-level dataset to the QADataset object to enable visualizations on top of these calculations.
          Hide
          tmorton Tim Morton [X] (Inactive) added a comment - - edited

          For interest, the following is what the functor specfication looks like. The functor objects are imported from (and implemented in) functors.py. It is currently living next to the code in the package, which may not be the best place; I'm open to suggestions.

          x:
              functor: Mag
              args:
                  base_PsfFlux
          label:
              functor: StarGalaxyLabeller
          funcs:
              cmodel_magDiff:
                  functor: MagDiff
                  args:
                      - modelfit_CModel
                      - base_PsfFlux
              gauss_magDiff:
                  functor: MagDiff
                  args:
                      - base_GaussianFlux
                      - base_PsfFlux
              count:
                  functor: Column
                  args:
                      - base_InputCount_value
              seeing:
                  functor: Seeing
           
              deconvolved_moments:
                  functor: DeconvolvedMoments
          flags:
              ref:
                  - calib_psfUsed
                  - merge_measurement_i
                  - merge_measurement_r
                  - merge_measurement_z
                  - merge_measurement_y
                  - merge_measurement_g
                  - base_PixelFlags_flag_inexact_psfCenter
              meas:
              forced_src:
          

          Show
          tmorton Tim Morton [X] (Inactive) added a comment - - edited For interest, the following is what the functor specfication looks like. The functor objects are imported from (and implemented in) functors.py . It is currently living next to the code in the package, which may not be the best place; I'm open to suggestions. x: functor: Mag args: base_PsfFlux label: functor: StarGalaxyLabeller funcs: cmodel_magDiff: functor: MagDiff args: - modelfit_CModel - base_PsfFlux gauss_magDiff: functor: MagDiff args: - base_GaussianFlux - base_PsfFlux count: functor: Column args: - base_InputCount_value seeing: functor: Seeing   deconvolved_moments: functor: DeconvolvedMoments flags: ref: - calib_psfUsed - merge_measurement_i - merge_measurement_r - merge_measurement_z - merge_measurement_y - merge_measurement_g - base_PixelFlags_flag_inexact_psfCenter meas: forced_src:
          Hide
          tmorton Tim Morton [X] (Inactive) added a comment -

          Kian-Tat Lim, let me know if you can also review this one. I thought it would make sense for you to review both DM-13876 and this at once, since this is the first use case of the stuff in the first ticket. Sorry about the qa_explorer PR; it looks a bit messy probably because I rebased it off the other ticket branch.

          Show
          tmorton Tim Morton [X] (Inactive) added a comment - Kian-Tat Lim , let me know if you can also review this one. I thought it would make sense for you to review both DM-13876 and this at once, since this is the first use case of the stuff in the first ticket. Sorry about the qa_explorer PR; it looks a bit messy probably because I rebased it off the other ticket branch.
          Hide
          tmorton Tim Morton [X] (Inactive) added a comment -

          Kian-Tat Lim I've switched Jim Bosch to be the reviewer for this one, since he wants to look at it anyway. Jim Bosch, you should be good with these two ticket branches and with the DM-13876 ticket branch in daf_persistence.

          Show
          tmorton Tim Morton [X] (Inactive) added a comment - Kian-Tat Lim I've switched Jim Bosch to be the reviewer for this one, since he wants to look at it anyway. Jim Bosch , you should be good with these two ticket branches and with the DM-13876 ticket branch in daf_persistence.
          Hide
          jbosch Jim Bosch added a comment -

          Review complete, comments on the PR.

          One thing I didn't mention there is that I would like to get a lot of this code out of qa_explorer and into a new package - how does pipe_postprocessing sound?  That doesn't need to be done on this ticket, or even be done by you if you have other priorities before the end of the sprint, but I'd appreciate if you could open a ticket for it and identify there what you think should be moved vs. what is actually specific to the QA tools.

          Show
          jbosch Jim Bosch added a comment - Review complete, comments on the PR. One thing I didn't mention there is that I would like to get a lot of this code out of qa_explorer  and into a new package - how does pipe_postprocessing sound?  That doesn't need to be done on this ticket, or even be done by you if you have other priorities before the end of the sprint, but I'd appreciate if you could open a ticket for it and identify there what you think should be moved vs. what is actually specific to the QA tools.

            People

            Assignee:
            tmorton Tim Morton [X] (Inactive)
            Reporter:
            tmorton Tim Morton [X] (Inactive)
            Reviewers:
            Jim Bosch
            Watchers:
            Jim Bosch, John Swinbank, Kian-Tat Lim, Tim Morton [X] (Inactive), Yusra AlSayyad
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.