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-35007: Make schema documentation of HSM moments useful #38
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving these docs; I have some wording suggestions, based on how these look in the schema you posted on Jira. I'm not wedded to that new wording, but I think we should look at it from the perspective of someone reading the schema.
I do wish we had some discussion about what exactly HSM is. The readme is entirely unhelpful, and we don't have any package docs. I believe the term comes from the name of one or more papers: could you please add a link to the relevant papers to the readme as part of this? That's the minimum: I think some package docs are probably out of scope for this ticket, but please file a ticket linked from this one saying that we need them.
HsmSourceMomentsAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema) : | ||
HsmMomentsAlgorithm(name, schema, "Source adaptive moments algorithm from HSM"), _ctrl(ctrl) | ||
HsmSourceMomentsAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema, | ||
char const* doc = "Source adaptive moments algorithm from HSM") : ///< Docstring is exposed for HsmSourceMomentsRoundAlgorithm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"from HSM" or "from shapeHSM"? Are we referring to the HSM
paper here, or to this shapeHSM
package?
Seeing how these come out in the schema, I wonder if "Source adaptive moments via the HSM shape algorithm" (still not sure whether to use shapeHSM
or HSM shape
or what) might be better? A user reading the catalog schema is asking "what is this and where did it come from", and "X algorithm from HSM" is answering a different question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgive me for intruding, but I thought HSM came from "Hirata, Seljak Moments": https://ui.adsabs.harvard.edu/abs/2003MNRAS.343..459H/abstract (adaptive moments). I've heard "Hirata, Seljak, Mandelbaum", but I'm not sure that's the case. I'll ask Rachel Mandelbaum. (This is in response to the comment above "I do wish we had some discussion about what exactly HSM is. ")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think shapeHSM
is going to be particularly useful either, since that's literally the string in the column name. HSM, in practice, refers to a very specific implementation of an algorithm that's not fundamentally different from SDSS shapes. I don't have a better alternative to what you suggested John, so I will go with it. I'll add the reference in the README and create a ticket to put in some module level documentation explaining it in a bit more detail.
public: | ||
/// @brief Initialize with standard field names and customized documentation. | ||
HsmSourceMomentsRoundAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema, | ||
char const* doc = "Source adaptive moments algorithm from HSM, with circular weight function") : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, "Source adaptive moments via the HSM shape algorithm..." or something like that.
HsmMomentsAlgorithm(name, schema, "Psf adaptive moments algorithm from HSM"), _ctrl(ctrl) {} | ||
|
||
HsmPsfMomentsAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema, | ||
char const* doc = "PSF adaptive moments algorithm from HSM" ///< Docstring is exposed for debiased PSF algorithm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, "PSF adaptive moments via the HSM shape algorithm"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see how this can be confusing as well, if it is interpreted to mean some PSF was adapted to some standard one to measure the moments. I will change this to "Adaptive moments of the PSF via the HSM shape algorithm".
HsmPsfMomentsDebiasedAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema) : | ||
HsmPsfMomentsAlgorithm(ctrl, name, schema) { | ||
HsmPsfMomentsDebiasedAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema, | ||
char const* doc = "Debiased PSF adaptive moments algorithm from HSM") : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, "Debiased PSF adaptive moments via the HSM shape algorithm", or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this to "Debiased adaptive moments of the PSF via the HSM shape algorithm".
@@ -39,7 +39,7 @@ | |||
Control=HsmShapeRegaussControl, executionOrder=BasePlugin.SHAPE_ORDER) | |||
wrapSimpleAlgorithm(HsmSourceMomentsAlgorithm, name="ext_shapeHSM_HsmSourceMoments", | |||
Control=HsmSourceMomentsControl, executionOrder=BasePlugin.SHAPE_ORDER) | |||
wrapSimpleAlgorithm(HsmSourceMomentsAlgorithm, name="ext_shapeHSM_HsmSourceMomentsRound", | |||
wrapSimpleAlgorithm(HsmSourceMomentsRoundAlgorithm, name="ext_shapeHSM_HsmSourceMomentsRound", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's definitely a bug! Good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: It wasn't a bug, since whether round moments are calculated or not, was entiredly determined with the Control
class. HsmSourceMomentsRoundAlgorithm
is defined in this ticket, and is subclassed solely to have a different docstring.
Yup, you're correct Andres. That's the origin of HSM.
…On Fri, Sep 23, 2022, 5:37 PM Andrés Alejandro Plazas Malagón < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In include/lsst/meas/extensions/shapeHSM/HsmMomentsControl.h
<#38 (comment)>
:
> @@ -183,8 +183,9 @@ class HsmSourceMomentsAlgorithm : public HsmMomentsAlgorithm {
typedef HsmSourceMomentsControl Control;
/// @brief Initialize with standard field names and customized documentation.
- HsmSourceMomentsAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema) :
- HsmMomentsAlgorithm(name, schema, "Source adaptive moments algorithm from HSM"), _ctrl(ctrl)
+ HsmSourceMomentsAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema,
+ char const* doc = "Source adaptive moments algorithm from HSM") : ///< Docstring is exposed for HsmSourceMomentsRoundAlgorithm
Forgive me for intruding, but I thought HSM came from "Hirata, Seljak
Moments": https://ui.adsabs.harvard.edu/abs/2003MNRAS.343..459H/abstract
(adaptive moments). I've heard "Hirata, Seljak, Mandelbaum", but I'm not
sure that's the case. I'll ask Rachel Mandelbaum. (This is in response to
the comment above "I do wish we had some discussion about what exactly HSM
is. ")
—
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABG56HURKIIKA6VSCT5B4ULV7YPLBANCNFSM5Y7CPCCA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
So, it turns out that I was wrong, and it is indeed "Hirata, Seljak, and Mandelbaum" :) I'm glad I asked Rachel. She said that Hirata & Seljak developed the formalism and initial code, but then she modified it when applying it in practice to the Mandelbaum et al (2005) SDSS shape catalog paper. So it’s Hirata, Seljak, and Mandelbaum because they initiated the concept and code and she made updates to get it working in practice on the data. |
Oh, I misread the exact wording of your original comment. I did mean HSM
stands for Hirata, Seljak & Mandelbaum but good that you double checked
that
…On Fri, Sep 23, 2022, 6:20 PM Andrés Alejandro Plazas Malagón < ***@***.***> wrote:
So, it turns out that I was wrong, and it is indeed "Hirata, Seljak, and
Mandelbaum" :) I'm glad I asked Rachel. She said that Hirata & Seljak
developed the formalism and initial code, but then she modified it when
applying it in practice to the Mandelbaum et al (2005) SDSS shape catalog
paper. So it’s Hirata, Seljak, and Mandelbaum because they initiated the
concept and code and she made updates to get it working in practice on the
data.
—
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABG56HR2LIIHQBWVEWSMGSTV7YULHANCNFSM5Y7CPCCA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
983f8fc
to
6dd8777
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, that info in the readme is a good start to describing what this does.
df98a80
to
a7b4876
Compare
No description provided.