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

Plotting error box #39

Open
lmichel opened this issue Dec 9, 2022 · 1 comment · May be fixed by #110
Open

Plotting error box #39

lmichel opened this issue Dec 9, 2022 · 1 comment · May be fixed by #110
Milestone

Comments

@lmichel
Copy link

lmichel commented Dec 9, 2022

The API plotting catalogues could be enable to plot individual error boxes for any plotted source.

The API could look like ( just an example, not a requirement)

aladin.plotCatalogue(cat_url, ra_col, dec_col,  error_columns=[err_columns]);

error_columns is an array which dimension denotes the type of error:

  • err_columns=[pos_err]: plots a circle with the value of the column pos_err as radius.
  • err_columns=[pos_ra, pos_dec]: plots a vertical ellipse with the value of the column pos_ra and pos_dec as axes.
  • err_columns=[major_axis, minor_axis, angle]: plots an ellipse with major_axis and minor_axis as axes oriented following angle from the east of the North (convention)
@fxpineau
Copy link
Member

fxpineau commented Aug 6, 2024

@tboch and @bmatthieu3 asked me to comment this issue.
I think that one should pass the explicit type of error in addition to its parameters, e.g.:

  • RadialError(r=e_RADEC, enclosed_proba=0.39347) in which:
    • r is the radius of the cone containing the real (unknown) position with a probability equals to enclosed_proba; for the enclosed_proba default value (0.39347, i.e. 39.347%), r correspond to the sigma of the Rayleigh distribution
    • enclosed_proba the probability the cone of radius r has to contain the real position; common values are 0.68269 (the 1-dimentional 1-sigma), 0.90 and 0.95.
  • SymmetricError(sigma=e_RADEC): the parameter on both axis of a symmetric 2-dimentional Gaussian
  • ? CovEllipse(sigma_ra=e_RA,sigma_dec=e_DEC, covariance=0.0): parameters of a 2-dimentional Gaussian provided as an ellipse with a covariance parameter, in which:
    • sigma_ra: error on the RA*cos(Dec) quantity, usually simply called RA error
    • sigma_dec: error on the Dec quantity
    • covariance: covariance factor, default value equals 0
  • CorEllipse(sigma_ra=e_RA,sigma_dec=e_DEC, correlation=0.0): parameters of a 2-dimentional Gaussian provided as an ellipse with a correlation parameter, so that it equals CovEllipse(sigma_ra, sigma_dec, covariance=correlation * sigma_ra * sigma_dec), and in which:
    • sigma_ra: error on the RA*cos(Dec) quantity, usually simply called RA error
    • sigma_dec: error on the Dec quantity
    • correlation: correlation factor, default value equals 0
  • CoSigmaEllipse(sigma_ra=e_RA,sigma_dec=e_DEC, cosig=0.0) parameters of a 2-dimentional Gaussian provided as an ellipse with a correlation parameter, so that it equals CovEllipse(sigma_ra,sigma_dec, covariance=cosig * |cosig|), see sigradec in the AllWISE doc.
  • OrientedEllipse(smaj, smin, pa) parameters of a 2-dimentional Gaussian provided by its 1-sigma ellipse, in which:
    • smaj: semi-major axis
    • smin: simi-minor axis
    • pa: position angle, east-of-north convention (like in @lmichel comment)

For each error, one could add an extra parameter ellipse_enclosed_probability with a default value set to 0.39347 and which would be the integral of the probability of the 2-dimentional Gaussian enclosed in the drawn ellipse. This parameter will thus influence the size of the ellipses which are displayed.

I can provide you with Rust code making the various conversions from/to ellipse/symmetric error/covariance matrix/...

For more details, see section 4.2 of this paper.

@ManonMarchand ManonMarchand linked a pull request Sep 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants