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

Using UCD in models #15

Open
lmichel opened this issue Mar 12, 2021 · 16 comments
Open

Using UCD in models #15

lmichel opened this issue Mar 12, 2021 · 16 comments
Labels
documentation Improvements or additions to documentation

Comments

@lmichel
Copy link
Collaborator

lmichel commented Mar 12, 2021

No description provided.

@lmichel lmichel added the documentation Improvements or additions to documentation label Mar 12, 2021
@lmichel
Copy link
Collaborator Author

lmichel commented Mar 12, 2021

This thread continues the topic initiated [here](https://github.com/ivoa/dm-usecases/issues/12#issuecomment-795751659]

UCD tells more that measure type.
UCDs are 2 words label e.g. pos;meta.main
Therefore you cannot put UCDs in measures as built-in parameters.
....
....

@lmichel
Copy link
Collaborator Author

lmichel commented Mar 12, 2021

A challenge we have to face, is to build a model encompassing any parameter one can found in astronomical catalogs.

  • The natural way to do this is to make one class for each quantity. This does not work because there are too much differents sort of parameters, and their number increases day after day.

  • The solution adopted by Mango is to use specific classes in a few cases (position ...) and to model the others with generic objects (meas:GenericMeasure).

  • The problem is now to get the physical meaning of a GenericMeasures. We need a semantic tag for doing this (e.g This is measure is a magnetic field).

My proposal is to use the Uniform Content Descriptor (UCDs) for this.

Both @mcdittmar and @msdemlei claim that UCDs cannot be used in a model (I do not agree).
The arguments are that the scope of the UCDs goes beyond the quantity roles and that we can get mismatchs between UCDs and measure classes (e.g. a magnitude with ucd=pos.eq)

This issue has been tackled by the MANGO proposal which forces UCD prefixes for specific classes. So that a magnitude with ucd=pos.eq is not compliant with the model.

It has also been proposed to use a vocabulary, but building a vocabulary that would be a subset of the UCDs is a job which is not worth it, except if it just maps UCDs (or a subset of). This would be like hidding the use of UCDs.

Other suggestions?

@mcdittmar
Copy link
Collaborator

mcdittmar commented Mar 12, 2021 via email

@msdemlei
Copy link
Contributor

msdemlei commented Mar 15, 2021 via email

@lmichel
Copy link
Collaborator Author

lmichel commented Mar 15, 2021

I understand Mark's point of view, though I do not follow it totally.

You are right if we consider that Property.ucd is just here to define measure types, UCDs do more and restricting their roles to a sort of class type is misleading
So let's figure out a pattern that statisfies the need both modeling measure types and describing measure physical meaning.

1- providing types to measures

  • for some of them this done by the object classes (position, pm ..) not extra things to do
  • for the others (GenericMeasure) we need a specific tag, let's call it MeasureType

The requirements for MeasureType are

  • Open ended vocabulary
  • Exentable without model update
  • To be set as a meas:Measure attribute to make Measurement model self consistant.
    The good way to proceed would be to derivate this vocabulary from the UCD list by jusy keeping the relevant fragments (e.g. magField)

2- Describing the measure content
As said we need to also to set the roles of the measures.

Actually this is not the purpose of mango:Property.semantic.
Property.semantic is here to allow connecting a measure with a vocabulary term. For now I've no concrete example working with Property.semantic, so I propose to push it aside (may be to remove it).

I insist to say that the better candidate to describe the measure role is the UCD.

In this configuation, the measurement model would be able to associate type with GenericMeasure and Mango would carry the complete measure descripitions of the measure with UCDs.
Making sure that UCDs are consistant with the measure objects they are associated with is the reponsability of the data annoter. This risk of consistency breaking exist each time data are tagged with semantic data, it is not specific to our case.

@lmichel
Copy link
Collaborator Author

lmichel commented Mar 15, 2021

Markus,

My take is: This is a problem that immediately goes away when you
properly define "build a model".

I answered to your take by anticipation in this post.

To me, the model must be valid, self-consistant and usable out of the scope of VOTable parsing. This is why it cannot be designed as a set of independant objects spread over VOTable FIELDs.

We have a model for columns quantities: MCT
We need a model providing a scheme to put these quantities together as well as extra information.

@Bonnarel
Copy link
Contributor

Bonnarel commented May 3, 2021

I've read this thread and also the long #12 one.
First all, I disagree that ucd mix quantity types and roles. They are quantity types. The combination feature with semi column was there to refine quantity type by using another complementary one. UCDS allow to compare coumns content from an universal physical quantify annotation ouside any datamodel context.
Initially the "role" of a FIELD in VOTable was to be given by the utype attribute ;-). Let's not speak anymore about utypes. (fb : sad face ;-) )
Now the "role" should be given by a combination of vodml-roles in the annotation.
Or if not = what kind of other "role" do you have in mind ?

This said I think I follow Laurent for the remaining part.
a ) we have specialized mango:parameters using per-physics Measures. Now we know that PhotometricFlux can be one of those (just we have to add it to Measure)
b ) IN case we find some odd measurements just use a Parameter with Generic Measure and we have the ucd attribute in mango:Parameter to tell us what it is.
c ) we make the two subcases consistent by SUBSETTING the Parameter.ucd to some specific value consistent with the Parameter and Measure Type when is a per-physics one.
d) this may be a ucd coarse grained compared to the one used in VOTable on each FIELD (but they should be consistent)
e ) the ucd attribute in the Parameter class is strongly useful for non VOTAble serializations
f ) we have such ucd attributes in classes not only in Provenance but also in ObsCore. The o_ucd is typically there to tell us the quantity type used as an Observable in the dataset

@msdemlei
Copy link
Contributor

msdemlei commented May 4, 2021 via email

@Bonnarel
Copy link
Contributor

Bonnarel commented May 5, 2021 via email

@lmichel
Copy link
Collaborator Author

lmichel commented May 5, 2021

MANGO speaking, I admit that the current draft has too many per-domain classes. (see MANGO issues)
My point of view:

  • Use per-domain class when it is necessary.
    • domain comes with specific frame classes (e.g. Time)
    • Specific set of coordinates (e.g. 2 coordinates for one position)
    • This allows validators to check that positions are bound with SpaceFrame and not with TimeFrame
  • Use generic measure anywhere else
    • no frame
    • one single coordinate

Having said that we need a way to give a role to those generic measures.
I reaffirm that using UCDs for this is not only valid but also smart.
The is why MANGO requires to have UCDs for each parameter.

In the context of a MANGO annotated VOtable, UCDs could either be set has reference to FIELD@ucd (see here) or as literals.

  • by reference when both column and Mango parameter UCDs match together
  • as literal in any other cases.
    • UCD not provided in the VOTable.
    • UCDs do not match (e.g pos.eq.ra and pos.eq.dec for the position fields vs pos.eq for the MANGO position Parameter)

@lmichel
Copy link
Collaborator Author

lmichel commented May 5, 2021

The current list of per-domain classes is rather limited (position, pm, veloc, time, luminosity)
We can expect to be prompted to extend it in a predictable future

  • Planetary data
  • Complex shaped objects
  • Multi messenger data

Mango has a place holder for this.
It is to be noted that adding new per-domain classes to MANGO would trigger minor revisions (nothing broken) that wouldn't break existing stuff.

@mcdittmar
Copy link
Collaborator

mcdittmar commented May 5, 2021 via email

@msdemlei
Copy link
Contributor

msdemlei commented May 6, 2021 via email

@lmichel
Copy link
Collaborator Author

lmichel commented May 7, 2021

Having UCDs on GenericMeasure only makes sense, but would require Meas model to do it.
For now UCDs are carried by MANGO and this concern all measure classes by construction.

2 elements answering Markus about the UCD repetitions :

  • The model must be consistent even out of the scope of a VOtable. I must be able to build a model instance, even on paper, that contain all element I need to describe my data. Hence I cannot rely to some underlying VOTable to design the model.
  • Not repeating UCDs in both FIELD and mapping block is a matter of syntax. (see this open post)

@Bonnarel
Copy link
Contributor

Bonnarel commented May 7, 2021

On Wed, May 05, 2021 at 01:36:50AM -0700, Bonnarel wrote: Le 04/05/2021 à 10:45, msdemlei a écrit : > Well, actually we already have @.*** -- let's see how far we get > with that. Sorry I don't understand what you are talking about. Can you be more explicit ?
Ah... that was "the ucd attribute of FIELD" (and PARAM) in xpath notation before github's spam obfuscator ate it. All I was saying is: We have a perfectly good place to store UCDs. Before we create another place, let's have crystal-clear use (!) cases that that place isn't good enough any more.

I don't think we propose to replace the ucd attribute on FIELDS/PARAM. What is in Mango is a wider usage of ucd as semantic tags. Both usages have to be consistent when appropriate

d) this may be a ucd coarse grained compared to the one used in > > VOTable on each FIELD (but they should be consistent) > > Um... why would someone use different UCDs in DM annotation and on > the field? Would would clients be supposed to do in such a case? OK. My point was unclear, I admit it. The ucd in Mango:parameter is not associated to a single FIELD or PARAM but to a group of them. (a group english word, not always a VOTable GROUP) as is the Measure.
Yeah, that would be a clear case, except I can't see a use case for these ucds on Measure (or whatever). On the contrary, I expect them to lead to rather confusing situations. Say you have a Photometric measurement. It's "group" UCD would presumably be something like phot.mag;em.opt.V, right? But now it would group two columns, the value and an error. These would then have UCDs phot.mag;em.opt.V and stat.error;phot.mag;em.opt.V. Don't you agree it's a bit odd to repeat the UCD on one of the reference fields, and to have a different one on the other? And of course, as usual: What would clients do with the UCD on Measure that they could not (possibly better) do with the UCD on the Measurement's value?

The code can preprare for maniging anything "below" this parameter as a Photometric Measurement

@Bonnarel
Copy link
Contributor

Bonnarel commented May 7, 2021

Having UCDs on GenericMeasure only makes sense, but would require Meas model to do it.
For now UCDs are carried by MANGO and this concern all measure classes by construction.

Is it possible to subset the mango:parameter ucd attribute value for per-physics classes ?

2 elements answering Markus about the UCD repetitions :

  • The model must be consistent even out of the scope of a VOtable. I must be able to build a model instance, even on paper, that contain all element I need to describe my data. Hence I cannot rely to some underlying VOTable to design the model.
  • Not repeating UCDs in both FIELD and mapping block is a matter of syntax. (see this open post)

+1 : good summary Laurent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants