Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-26393: Add Object.yaml specification #247

Merged
merged 1 commit into from Feb 20, 2021
Merged

Conversation

wmwv
Copy link
Contributor

@wmwv wmwv commented Aug 31, 2020

to transform multiband outputs to the parquet Object Table

import os
from lsst.utils import getPackageDir

config.filterMap = {band: band for band in 'ugrizy'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to know about the new filter names for imsim?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so. As of w_2020_32, we were still calling them ugrizy:

/datasets/DC2/repoRun2.2i/rerun/w_2020_32/DM-26287/coadd/deepCoadd
[yusra@lsst-devl01 deepCoadd]$ ls
g  i  r  u  y  z```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry. I saw "filterMap" and thought this was talking about filters. I missed the band on the right. Is this really bandMap ?

Note that the physical filter for imsim did change recently to include the sims throughputs version number.

Copy link
Contributor Author

@wmwv wmwv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Only two comments:

  • Please "ra", "dec" instead of "Ra", "Decl".
  • Why specify priorityList again? It is whatever it was from previous steps. But I also don't understand why it's even ever used in writeObjectTable.py.

I believe I made the same comments on the obs_subaru Object.yaml and lost and expect to lose again. The priorityList is just an internal issue, I don't deeply care.

  • But the "ra", "dec" naming issue means that DESC will literally rewrite the files again or run a branch with different choices to standardize the columns names for DESC DC2. I really encourage DRP+Science Platform to revisit this issue and choose this standardization.

[I can't officially set a status here because I created the PR in order to comment on it.]

from lsst.utils import getPackageDir

config.filterMap = {band: band for band in 'ugrizy'}
config.functorFile = os.path.join(getPackageDir("obs_lsst"), 'policy', 'imsim', 'Object.yaml')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'obs_lsst' instead of "obs_lsst" to be quote-character consistent

@@ -0,0 +1 @@
config.priorityList = ['i', 'r', 'z', 'y', 'g', 'u']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is priorityList used in the WriteObjectTable class?

Isn't the priorityList already determined by mergeCoaddDetections/Measurements.py?
If this priorityList and mergeCoaddDetections/Measurements.py disagree are things still consistent? If it doesn't matter, then what does priorityList do for WriteObjectTable.py

I understand that obs_subaru has the same config.priorityList setting for writeObjectTable.py.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vestigial config. Good catch. To be removed on this ticket on its own commit.

# coord_dec because "dec" is reserved in most SQL DBs
functor: DecColumn
dataset: ref
Ra:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"RA" or "ra". My preference would be "ra".

While one sees "Dec", "dec", and sometimes "DEC"; I've never seen "Ra" -- that just makes me think of the Sun god.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See convo on Jira. Any column with dataset !=ref gets expanded by filter: uRa, gRa, iRa...

functor: CoordColumn
args: coord_ra
dataset: meas
Decl:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's annoying. Can we make this "dec" instead of "decl"?

I understand some ancient databases get confused with "dec"imal type, but Parquet certainly doesn't care and Postgres doesn't get confused. Is there something we're using where this is a problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where "annoying" specifically means I will literally have to rewrite out the DC2 Object files again with a column named "dec" before providing to DESC members.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something we're using where this is a problem?

qserv/mysql.

I don't know what to say. I put this ticket on the shelf hoping an idea would appear for giving you an ra/dec here, but I think the best I can offer is a ra/decl with the same values coord_ra/coord_dec.

Copy link
Contributor

@yalsayyad yalsayyad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

response

@@ -0,0 +1 @@
config.priorityList = ['i', 'r', 'z', 'y', 'g', 'u']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vestigial config. Good catch. To be removed on this ticket on its own commit.

import os
from lsst.utils import getPackageDir

config.filterMap = {band: band for band in 'ugrizy'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so. As of w_2020_32, we were still calling them ugrizy:

/datasets/DC2/repoRun2.2i/rerun/w_2020_32/DM-26287/coadd/deepCoadd
[yusra@lsst-devl01 deepCoadd]$ ls
g  i  r  u  y  z```

# coord_dec because "dec" is reserved in most SQL DBs
functor: DecColumn
dataset: ref
Ra:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See convo on Jira. Any column with dataset !=ref gets expanded by filter: uRa, gRa, iRa...

functor: CoordColumn
args: coord_ra
dataset: meas
Decl:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something we're using where this is a problem?

qserv/mysql.

I don't know what to say. I put this ticket on the shelf hoping an idea would appear for giving you an ra/dec here, but I think the best I can offer is a ra/decl with the same values coord_ra/coord_dec.

to transform multiband outputs to the parquet Object Table
@yalsayyad yalsayyad merged commit 31a9db6 into master Feb 20, 2021
@yalsayyad yalsayyad deleted the tickets/DM-26393 branch February 20, 2021 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants