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

Function to create a "useful" catalog schema, and subsequent catalog

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: afw

      Description

      I keep running into a problem of trying to create a "minimally useful" schema that can be used by a Task (joincal in this instance, but others in the past), and having to copy the same large block of self.someKey = self.schema.addField("blah_flux", type="D"), and then realize that the place I copied it from doesn't have one of the fields I actually need in this instance. It would be very handy to have an lsst.afw.table.makeTaskOutputSchema(), in the same vein as table.makeMinimalSchema(), to produce a well-populated table schema that represents some typical output of the stack with all the necessary slot​s filled in.

      With that in hand, we could have an table.makeTaskOutputTestCatalog(int n) that does the above and then creates and returns a table populated with n random values.

      It might be enough to have a pre-made table ready in afwdata (one may already exist?), but I'm torn on whether that might not age nicely (e.g. Sigma->Err changes).

        Attachments

          Issue Links

            Activity

            Hide
            jbosch Jim Bosch added a comment - - edited

            I don't think making a "typical" schema can be the responsibility of afw.table, as the entries in typical schemas area really defined by much higher-level Task code. And that suggests one way to get a schema in test code right now: construct an instance of the CmdLineTask whose schema you're interested in, and grab its .schema attribute.

            Beyond that, I actually think adding pre-made catalogs in afwdata or a successor is the right approach. But we don't have anything there now.
            AFAIK, nothing in afwdata has been touched substantially in ages - we've been waiting for someone to take a stab at making a new test data package, without any clear understanding who that someone is (DM-1102).

            Show
            jbosch Jim Bosch added a comment - - edited I don't think making a "typical" schema can be the responsibility of afw.table, as the entries in typical schemas area really defined by much higher-level Task code. And that suggests one way to get a schema in test code right now: construct an instance of the CmdLineTask whose schema you're interested in, and grab its .schema attribute. Beyond that, I actually think adding pre-made catalogs in afwdata or a successor is the right approach. But we don't have anything there now. AFAIK, nothing in afwdata has been touched substantially in ages - we've been waiting for someone to take a stab at making a new test data package, without any clear understanding who that someone is ( DM-1102 ).
            Hide
            swinbank John Swinbank added a comment -

            Despite my comments on DM-1102 — and somewhat tangentially to this issue — I suggest that, post-replan, organizing test data for Pipelines now falls squarely within the remit of the Pipelines groups. Jim Bosch & Eric Bellm, we should think about how we want to prioritise that and consider scheduling work on it during S18.

            Show
            swinbank John Swinbank added a comment - Despite my comments on DM-1102 — and somewhat tangentially to this issue — I suggest that, post-replan, organizing test data for Pipelines now falls squarely within the remit of the Pipelines groups. Jim Bosch & Eric Bellm , we should think about how we want to prioritise that and consider scheduling work on it during S18.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Parejkoj John Parejko
              Watchers:
              Jim Bosch, John Parejko, John Swinbank, Paul Price, Russell Owen, Simon Krughoff
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins

                  No builds found.