Skip to content

SSO: update information #677

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

Merged
merged 7 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions apps/sso/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def card_sso_mpc_params(data, ssnamenr, kind):
Orbit type: `{}`

###### Properties from MPC
ref epoch: `{}`
epoch: `{}`
number: `{}`
period (year): `{}`
a (AU): `{}`
Expand Down Expand Up @@ -524,10 +524,10 @@ def card_sso_rocks_params(data):

###### Physical parameters
Taxonomical class: `{data.parameters.physical.taxonomy.class_.value}`
Absolute magnitude (mag): `{data.parameters.physical.absolute_magnitude.value}`
Absolute magnitude (HV mag): `{data.parameters.physical.absolute_magnitude.value}`
Diameter (km): `{data.parameters.physical.diameter.value}`

###### Dynamical parameters (reference epoch: {ref_epoch})
###### Dynamical parameters (Epoch: {ref_epoch})
a (AU): `{semi_major_axis}`
e: `{data.parameters.dynamical.orbital_elements.eccentricity.value}`
i (deg): `{data.parameters.dynamical.orbital_elements.inclination.value}`
Expand All @@ -538,7 +538,9 @@ def card_sso_rocks_params(data):
Jupiter Tisserand parameter: `{data.parameters.dynamical.tisserand_parameters.jupiter.value}`
"""

if data.parameters.physical.spin is not None:
if (data.parameters.physical.spin is not None) and (
data.parameters.physical.spin != []
):
text = textwrap.dedent(text) # Remove indentation
text += "\n"
text += "###### Spin parameters\n"
Expand All @@ -549,6 +551,12 @@ def card_sso_rocks_params(data):
text += f"RA0 (deg): `{avail_spin.RA0.value}`\n"
text += f"DEC0 (deg): `{avail_spin.DEC0.value}`\n"

text += "\n"
text += "---\n"
text += '<i><small>Best estimates of the dynamical and physical properties of the object from the <a href="https://ssp.imcce.fr/forms/ssocard/{}" target="_blank">ssoCard</a> compiled by the <a href="https://ssp.imcce.fr/webservices/ssodnet/" target="_blank">SsODNet</a> service.</small></i>'.format(
data.id_
)

card = html.Div(
dcc.Markdown(
text,
Expand Down
4 changes: 2 additions & 2 deletions apps/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ def tab5_content(object_soo):
ssnamenr = pdf["i:ssnamenr"].to_numpy()[0]

msg = """
Alert data from ZTF, with ephemerides provided by the
[Miriade ephemeride service](https://ssp.imcce.fr/webservices/miriade/api/ephemcc/).
Alert data from ZTF (filled circle) in g (blue) and r (orange) filters, with ephemerides provided by the
[Miriade ephemeride service](https://ssp.imcce.fr/webservices/miriade/api/ephemcc/) (shaded circle).
"""
tab1 = dbc.Row(
[
Expand Down
Loading