Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Imports OntoEngineering, DB.OntoEngineeringParentChildTable
Context GroovedPin

--validation rules:
Let groovedPinConcept:CD = pinType
Let grooveNumberOk: Boolean = grooveNumber >= 2
Let partTypeOk: Boolean  = type.displayName.value = 'Mechanical'
Let correctAssocPart: Boolean = usedWith->exists(code.displayName.value='Bush')

--implies
Let mechanicalFirmLinkage_Concept: CD = CD{code = '6253914735',
                                           codeSystem ='3.16.840.1.113883.6.8',
                                           codeSystemName = 'OntoEValueDomain',
                                           displayName = ST{value = 'Mechanical Firm Linkage'}}
Let groovedPin_Concept: CD = CD{code = '9377156411',
                                codeSystem ='3.16.840.1.113883.6.8',
                                codeSystemName = 'OntoEValueDomain',
                                displayName = ST{value = 'Grooved Pin'}} 
Let test: Boolean = groovedPinConcept = groovedPin_Concept
Let parentConcept: CD = mechanicalFirmLinkage_Concept
Let childConcept: CD = groovedPin_Concept
Let ontoETable: Sequence(TBL.csv)= csv
Let selectedRowOrRows: Sequence(TBL.csv) =
         ontoETable->select((LeafID = childConcept.code.toReal())
                             and (
                                  (If Parent1.oclIsDefined() then Parent1 = parentConcept.code.toReal() else False endif) or
                                  (If Parent2.oclIsDefined() then Parent2 = parentConcept.code.toReal() else False endif) or
                                  (If Parent3.oclIsDefined() then Parent3 = parentConcept.code.toReal() else False endif) or
                                  (If Parent4.oclIsDefined() then Parent4 = parentConcept.code.toReal() else False endif) or
                                  (If Parent5.oclIsDefined() then Parent5 = parentConcept.code.toReal() else False endif) or
                                  (If Parent6.oclIsDefined() then Parent6 = parentConcept.code.toReal() else False endif) or
                                  (If Parent7.oclIsDefined() then Parent7 = parentConcept.code.toReal() else False endif) or
                                  (If Parent8.oclIsDefined() then Parent8 = parentConcept.code.toReal() else False endif))
                                 )
Let impliesBoolean: Boolean = selectedRowOrRows.size()>0

-- result
Tuple { checkGrooveNumber = grooveNumberOk ,
        checkPartTyping =  partTypeOk,
        checkUsedWith = correctAssocPart,
        checkSemantics = impliesBoolean
        }


and here is the result:

Image Added


Astronomy example

Astronomers use a type of star called a Cepheid variable to calculate distances to astronomical objects at galactic and extragalactic distances. This is because it was discovered that the period of the pulsations corresponds to their absolute brightness. There is a formula that then can also take the observed brightness of the object to calculate the distance of the star from Earth in parsecs. Type II Cepheids are usually used. These are population II stars with the characteristics of being metal poor, old, masses < 0.5 MSun and their periods determine subclasses. These subclasses are RV Tauri, W Vir and BL Her. RV Tauri stars including the star RV Tauri itself are massive supergiants. This example takes observations from a catalogue called SIMBAD for the RV Tauri object. The GELLO model is again bespoke but again uses ISO:21090 datatypes. There is an ontological appeal to a parent-child table based on the IVOA Ontology v. 1.3 for checking the supergiant relationship. We will assess a given star's suitability to be identified as a RV Tauri type Type II Cepheid variable star. (It should be as this is the type exemplar)

...

<?xml version="1.0" encoding="UTF-8"?>
<!--    TO DO List: change singlePatient to SIMBADObjectObservations
                      -->
<SIMBADObjectObservations     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:noNamespaceSchemaLocation="./iso-21090-datatypes.xsd">

 
        <designation value = "RV Tau" />
        <objectType>
            <code code="46612991"
                  codeSystem="2.16.840.1.113883.6.8"
                  codeSystemName="IOVA">
                  <displayName value = "RVTauri (AstrObject)" />
            </code>
            <condensedDesignation code="V*"
                                  codeSystem="2.16.840.1.113883.6.7"
                                  codeSystemName="SIMBAD">
                                  <displayName value = "V*" />
            </condensedDesignation>
            <standardName value = "V*" />
            <extendedExplanation value = "Variable Star of Mira Cet type" />
        </objectType>
         <otherObjectType>
            <condensedDesignation code="Wi*"
                                  codeSystem="2.16.840.1.113883.6.7"
                                  codeSystemName="SIMBAD">
                                  <displayName value = "WV*" />
            </condensedDesignation>
            <standardName value = "PulsV*RVTau" />
            <extendedExplanation value = "Variable Star of Mira Cet type" />
        </otherObjectType>
        <coordinates>
            <system code="ICRS"
                    codeSystem="Local_Coordinates"
                    codeSystemName="Local">
                    <displayName value = "International Celestial Reference System" />
            </system>
            <epoch code="J2000"
                   codeSystem="Local_Epoch"
                   codeSystemName="Local">
                   <displayName value = "Julian 2000 (2000011200)" />
            </epoch>
            <ra value = '04 47 06.7238218181' />
            <dec value = '+26 10 45.530144720' />
            <wType code="Opt"
                   codeSystem="Local_wType"
                   codeSystemName="Local">
                   <displayName value = "Optical" />
            </wType>
            <errorEllipse value = "0.0645 0.0365 90" />
            <quality code="A"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "A" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2018yCat.1345....0G"    />        
        </coordinates>
        <coordinates>
            <system code="FK4"
                    codeSystem="Local_Coordinates"
                    codeSystemName="Local">
                    <displayName value = "Fourth Fundamental Catalogue" />
            </system>
            <epoch code="B1950"
                   codeSystem="Local_Epoch"
                   codeSystemName="Local">
                   <displayName value = "Besellian 1950" />
            </epoch>
            <eq code="1950"
                   codeSystem="Local_Eq"
                   codeSystemName="Local">
                   <displayName value = "1950" />
            </eq>            
            <ra value = '04 44 01.9109548643' />
            <dec value = '+26 05 26.002025683' />
            <errorEllipse value = "0.0645 0.0365 90" />
        </coordinates>
        <coordinates>
            <system code="Gal"
                    codeSystem="Local_Coordinates"
                    codeSystemName="Local">
                    <displayName value = "Galactic" />
            </system>
            <epoch code="J2000"
                   codeSystem="Local_Epoch"
                   codeSystemName="Local">
                   <displayName value = "Julian 2000 (2000011200)" />
            </epoch>
            <ra value = '174.7738171895735' />
            <dec value = '-12.1901909775067' />
            <errorEllipse value = "0.0645 0.0365 90" />
        </coordinates>
        <properMotions>
            <pm_ra xsi:type = "PQ" value = "1.557" unit = "mas/yr" />
            <pm_dec xsi:type = "PQ" value = "-4.717" unit = "mas/yr" />
            <errorEllipse value = '1.546 1.104 90' />
            <quality code="A"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "A" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2016A%26A...595A...2G"    />    
        </properMotions>
        <radialVelocitiesAndOrRedshift>
            <value xsi:type = "PQ" value = "30.0" unit = "km/s" />
            <error xsi:type = "PQ" value = "2" unit = "km/s" />
            <quality code="E"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "E" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=1953GCRV..C......0W"    />                
        </radialVelocitiesAndOrRedshift>
        <parallaxes>
            <value xsi:type = "PQ" value = "0.6926" unit = "arcseconds" />
            <error xsi:type = "PQ" value = "0.0605" unit = "arcseconds" />
            <quality code="A"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "A" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2018yCat.1345....0G"    />    
        </parallaxes>
        <spectralType>
            <value value = 'K0' />
            <spectralClass code="K0"
                           codeSystem="Local_SpectralClass"
                           codeSystemName="Local">
                           <displayName value = "K0" />
            </spectralClass>
            <!-- why no luminosity class?  -->
            <luminosityClass code=""
                             codeSystem="Local_LuminosityClass"
                             codeSystemName="Local">
                             <displayName value = "" />
            </luminosityClass>
            <quality code="E"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "E" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=1995A%26AS..110..367N"    />    
        </spectralType>
        <fluxes>
            <filterName code="B"
                        codeSystem="Local_FilterName"
                        codeSystemName="Local">
                        <displayName value = "B" />
            </filterName>
            <system code="Vega"
                    codeSystem="Local_FilterName"
                    codeSystemName="Local">
                    <displayName value = "Vega" />
            </system>
            <fluxValue xsi:type = "Real" value = "11.00" />
            <error xsi:type = "Real" value = "0.10" />
            <quality code="D"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "D" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2000A%26A...355L..27H"    />    
        </fluxes>
        <fluxes>
            <filterName code="V"
                        codeSystem="Local_FilterName"
                        codeSystemName="Local">
                        <displayName value = "V" />
            </filterName>
            <system code="Vega"
                    codeSystem="Local_FilterName"
                    codeSystemName="Local">
                    <displayName value = "Vega" />
            </system>
            <fluxValue xsi:type = "Real" value = "9.8" />
            <quality code="C"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "C" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2002yCat.2237....0D"    />    
        </fluxes>
        <fluxes>
            <filterName code="G"
                        codeSystem="Local_FilterName"
                        codeSystemName="Local">
                        <displayName value = "G" />
            </filterName>
            <system code="Vega"
                    codeSystem="Local_FilterName"
                    codeSystemName="Local">
                    <displayName value = "Vega" />
            </system>
            <fluxValue xsi:type = "Real" value = "9.2887" />
            <error xsi:type = "Real" value = "0.0195" />
            <quality code="C"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "C" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2018yCat.1345....0G"    />    
        </fluxes>
        <fluxes>
            <filterName code="J"
                        codeSystem="Local_FilterName"
                        codeSystemName="Local">
                        <displayName value = "J" />
            </filterName>
            <system code="Vega"
                    codeSystem="Local_FilterName"
                    codeSystemName="Local">
                    <displayName value = "Vega" />
            </system>
            <fluxValue xsi:type = "Real" value = "6.183" />
            <error xsi:type = "Real" value = "0.020" />
            <quality code="C"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "C" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2003yCat.2246....0C"    />    
        </fluxes>
        <fluxes>
            <filterName code="H"
                        codeSystem="Local_FilterName"
                        codeSystemName="Local">
                        <displayName value = "V" />
            </filterName>
            <system code="Vega"
                    codeSystem="Local_FilterName"
                    codeSystemName="Local">
                    <displayName value = "Vega" />
            </system>
            <fluxValue xsi:type = "Real" value = "5.488" />
            <error xsi:type = "Real" value = "0.020" />
            <quality code="C"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "C" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2003yCat.2246....0C"    />    
        </fluxes>
        <fluxes>
            <filterName code="K"
                        codeSystem="Local_FilterName"
                        codeSystemName="Local">
                        <displayName value = "K" />
            </filterName>
            <system code="Vega"
                    codeSystem="Local_FilterName"
                    codeSystemName="Local">
                    <displayName value = "Vega" />
            </system>
            <fluxValue xsi:type = "Real" value = "4.777" />
            <error xsi:type = "Real" value = "0.018" />
            <quality code="C"
                     codeSystem="Local_Quality"
                     codeSystemName="Local">
                     <displayName value = "C" />
            </quality>
            <bibCode value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2003yCat.2246....0C"    />    
        </fluxes>
        <identifiers root="HD" extension="283868" />
        <identifiers root="AG+" extension="+26 443" />
        <identifiers root="AN" extension="45.1905" />
        <identifiers root="ASAS" extension="J044707+2610.7" />
        <identifiers root="BD+" extension="+25 732" />
        <identifiers root="Elia" extension="3-20" />
        <identifiers root="GCRV" extension="2803" />
        <identifiers root="GSC2" extension="N301132129" />
        <identifiers root="GSC" extension="01835-01075" />
        <identifiers root="IRAS" extension="04440+2605" />
        <identifiers root="2MASS" extension="J04470673+2610455" />
        <identifiers root="PPM" extension="93762" />
        <identifiers root="TIC" extension="59838803" />
        <identifiers root="TYC" extension="1835-1075-1" />
        <identifiers root="V*" extension="RV Tau" />
        <identifiers root="WEB" extension="4279" />
        <identifiers root="WISE" extension="J044706.73+261045.5" />
        <identifiers root="WISE" extension="J044706.74+261045.7" />
        <identifiers root="[WWV2004]" extension="J0447067+261046" />
        <identifiers root="AAVSO" extension="0441+26" />
        <identifiers root="Gaia" extension="DR1 154255571501975936" />
        <identifiers root="Gaia" extension="DR2 154255575798532096" />
        <references></references>
        <collectionsOfMeasurements>
            <velocities>
                <vStar xsi:type = "PQ" value = "30.0" unit = "km/s" />
                <reference>
                    <date xsi:type = "TS" value = "2013" />
                    <firstAuthor value = "Mooley K" />
                    <title value = "B- and A-type stars in the Taurus-Auriga star-forming region." />
                    <journal value = "Astrophys. J." />
                    <url value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2013ApJ...771..110M" />
                </reference>
            </velocities>
            <fe_H></fe_H>
            <distance>
                <distance xsi:type = "PQ" value = "1443.8348" unit = "pc" />
                <merr xsi:type = "PQ" value = "126.1219" unit = "pc" />
                <perr xsi:type = "PQ" value = "126.1219" unit = "pc" />
                <method code="paral"
                        codeSystem="Local_Method"
                        codeSystemName="Local">
                        <displayName value = "paral" />
                </method>
                <reference>
                    <date xsi:type = "TS" value = "2018" />
                    <firstAuthor value = "GAIA COLLABORATION" />
                    <title value = "GAIA DR2" />
                    <journal value = "CDS/ADC Collection of Electronic Catalogues" />
                    <url value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2018yCat.1345....0G" />
                </reference> 
            </distance>
            <plx>
                <plx xsi:type = "PQ" value = "0.6926" unit = "arcseconds" />
                <m_e xsi:type = "Real" value = "0.0605" />
                <reference>
                    <date xsi:type = "TS" value = "2018" />
                    <firstAuthor value = "GAIA COLLABORATION" />
                    <title value = "GAIA DR2" />
                    <journal value = "CDS/ADC Collection of Electronic Catalogues" />
                    <url value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2018yCat.1345....0G" />
                </reference> 
            </plx>
            <plx>
                <plx xsi:type = "PQ" value = "1.210" unit = "arcseconds" />
                <m_e xsi:type = "Real" value = "0.360" />
                <reference>
                    <date xsi:type = "TS" value = "2016" />
                    <firstAuthor value = "GAIA COLLABORATION" />
                    <title value = "Gaia Data Release 1. Summary of the astrometric, photometric, and survey properties." />
                    <journal value = "Astronomy and Astrophysics" />
                    <url value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2016A%26A...595A...2G" />
                </reference> 
            </plx>
            <rot></rot>
            <pm></pm>
            <variableStar>
                <varType code="M"
                         codeSystem="Local_VarType"
                         codeSystemName="Local">
                         <displayName value = "M" />
                </varType>
                <vMax xsi:type = "PQ" value = "8.9585" unit = "mag" />
                <p  value = "R" />
                <vMin xsi:type = "PQ" value = "9.9695" unit = "mag" />
                <period xsi:type = "PQ" value = "236" unit = "d" />
                <reference>
                    <date xsi:type = "TS" value = "2004" />
                    <firstAuthor value = "Wozniak S,J" />
                    <title value = "Identifying red variables in the Northern Sky Variability Survey." />
                    <journal value = "Astron. J." />
                    <url value = "http://simbad.u-strasbg.fr/simbad/sim-ref?bibcode=2004AJ....128.2965W" />
                </reference> 
            </variableStar>
        </collectionsOfMeasurements>
        <literatureDerivedParameters>
            <luminosity>
                <l xsi:type = "PQ" value = "2800" unit = "Lsun" />
                <reference>
                    <date xsi:type = "TS" value = "201908" />
                    <firstAuthor value = "Manick R" />
                    <title value = "Spectroscopic binaries RV Tauri and DF Cygni" />
                    <journal value = "Astronomy and Astrophysics." />
                    <url value = "https://www.aanda.org/articles/aa/full_html/2019/08/aa34956-18/aa34956-18.html" />
                </reference> 
            </luminosity>
            <mass>
                <m xsi:type = "PQ" value = "0.53" unit = "Msun" />
                <reference>
                    <date xsi:type = "TS" value = "201908" />
                    <firstAuthor value = "Manick R" />
                    <title value = "Spectroscopic binaries RV Tauri and DF Cygni" />
                    <journal value = "Astronomy and Astrophysics." />
                    <url value = "https://www.aanda.org/articles/aa/full_html/2019/08/aa34956-18/aa34956-18.html" />
                </reference> 
            </mass>
            <metallicity>
                <met xsi:type = "Real" value = "-0.3"  />
                <minusError xsi:type = "Real" value = "0.2"  />
                <plusError xsi:type = "Real" value = "0.2"  />
                <reference>
                    <date xsi:type = "TS" value = "201908" />
                    <firstAuthor value = "Manick R" />
                    <title value = "Spectroscopic binaries RV Tauri and DF Cygni" />
                    <journal value = "Astronomy and Astrophysics." />
                    <url value = "https://www.aanda.org/articles/aa/full_html/2019/08/aa34956-18/aa34956-18.html" />
                </reference> 
            </metallicity>
            <tEff>
                <t xsi:type = "PQ" value = "4810" unit = "K" />
                <minusError xsi:type = "PQ" value = "200" unit = "K" />
                <plusError xsi:type = "PQ" value = "200" unit = "K" />
                <reference>
                    <date xsi:type = "TS" value = "201908" />
                    <firstAuthor value = "Manick R" />
                    <title value = "Spectroscopic binaries RV Tauri and DF Cygni" />
                    <journal value = "Astronomy and Astrophysics." />
                    <url value = "https://www.aanda.org/articles/aa/full_html/2019/08/aa34956-18/aa34956-18.html" />
                </reference> 
            </tEff>
        </literatureDerivedParameters>
ology binding   </SIMBADObjectObservations>

...

to the IVOA Ontology ( with local randomly generated and unique codes). 


GELLO

Have we an instance of a Type II Cepheid variable and what subtype is it?

Imports SIMBADObjectPackage, IVOALib --, AstroLib
Context SIMBADObjectObservations

Let observedStar: SIMBADObjectObservations = Self


-- is Type II Cepheid and what subclass?
-- Type II cepheids are pop II stars, metal poor, old, masses < 0.5 MSun, periods determine subclass
-- -------------------- ------------ -------------- ------------- ---------- ------ ----- ------------
-- | TypeIICep subclass| Supergiant?| SpectralClass| Teff{K)     | period(d)| Lum  | Mass| Metallicity|
-- -------------------- ------------ -------------- ------------- ---------- ------ ----- ------------
-- | RV Tauri          |     Y      | G - K        | 4100 - 6000 |  > 20    | high | low |    low     |
-- | W Vir             |     N      | F6 - K2      | 4900 - 6200 |  10 - 20 |      | low |    low     |
-- | BL Her            |     N      | varies       |             |  1 - 4   | low  | low |    low     |
-- -------------------- ------------ -------------- ------------- ---------- ------ ----- ------------
Let observedVarPeriod: PQ = If observedStar.collectionsOfMeasurements.variableStar.first().period.oclIsDefined() then
                            observedStar.collectionsOfMeasurements.variableStar->sortedBy(r|r.reference.date).last().period
                           else null
                          endif
Let observedTeff: PQ = If observedStar.collectionsOfMeasurements.fe_H.first().tEff.oclIsDefined() then
                         observedStar.collectionsOfMeasurements.fe_H->sortedBy(r|r.reference.date).last().tEff
                        else null
                       endif
Let observedFe_H: Real = If observedStar.collectionsOfMeasurements.fe_H.first().fe_H.oclIsDefined() then
                           observedStar.collectionsOfMeasurements.fe_H->sortedBy(r|r.reference.date).last().fe_H
                          else null
                         endif
Let observedStarLumClass:CD = observedStar.spectralType.luminosityClass  -- use fluxes?
Let litCalculatedMass: PQ = If observedStar.literatureDerivedParameters.mass.first().m.oclIsDefined() then
                           observedStar.literatureDerivedParameters.mass->sortedBy(r|r.reference.date).last().m
                          else null
                         endif
Let lit_Luminosity: PQ = If observedStar.literatureDerivedParameters.luminosity.first().l.oclIsDefined() then
                           observedStar.literatureDerivedParameters.luminosity->sortedBy(r|r.reference.date).last().l
                          else null
                         endif
Let lit_Metallicity: Real = If observedStar.literatureDerivedParameters.metallicity.first().met.oclIsDefined() then
                              observedStar.literatureDerivedParameters.metallicity->sortedBy(r|r.reference.date).last().met
                             else null
                            endif
Let lit_TEff: PQ = If observedStar.literatureDerivedParameters.tEff.first().t.oclIsDefined() then
                              observedStar.literatureDerivedParameters.tEff->sortedBy(r|r.reference.date).last().t
                             else null
                            endif
Let lit_VarPeriod: PQ = If observedStar.literatureDerivedParameters.variabilityPeriod.first().p.oclIsDefined() then
                              observedStar.literatureDerivedParameters.variabilityPeriod->sortedBy(r|r.reference.date).last().p
                             else null
                            endif
--get best parameter values where needed
Let metallicityBest: Real = If observedFe_H.oclIsDefined() then observedFe_H else
                            If lit_Metallicity.oclIsDefined() then lit_Metallicity else
                            null endif endif
Let varPeriodBest: PQ = If observedVarPeriod.oclIsDefined() then observedVarPeriod else
                            If lit_VarPeriod.oclIsDefined() then lit_VarPeriod else
                            null endif endif
Let tEffBest: PQ = If observedTeff.oclIsDefined() then observedTeff else
                            If lit_TEff.oclIsDefined() then lit_TEff else
                            null endif endif
--Type II Cepheid query
Let isLowMass: Boolean = litCalculatedMass < PQ{value = 0.6, unit = "Msun"}
Let isMetalPoor: Boolean = metallicityBest < 0.05
Let isVariable: Boolean = varPeriodBest.oclIsDefined()
Let isTypeIICepheid: Boolean = isLowMass and isMetalPoor and isVariable
-- is Supergiant?
Let childIVOAConcept: CD = observedStar.objectType.code
Let parentIVOAConcept:CD = CD{code = '81261979', displayName = ST{value='SuperGiant'}, codeSystem = 'IVOA'}
Let isSuperGiant: Boolean = IVOAImplies(childIVOAConcept, parentIVOAConcept)

--Determine subclass If Type II cepheid variable
Let subclass: String =
  If isTypeIICepheid and varPeriodBest > PQ{value=20,unit='d'}
     and isSuperGiant and lit_Luminosity > PQ{value=1000,unit='Lsun'}
      and tEffBest > PQ{value=4100,unit='K'} and tEffBest < PQ{value=6000,unit='K'}
       then 'RV Tauri subclass' else
     if isTypeIICepheid and varPeriodBest > PQ{value=10,unit='d'} and varPeriodBest <= PQ{value=20,unit='d'}
        and tEffBest > PQ{value=4900,unit='K'} and tEffBest < PQ{value=6200,unit='K'}
         then 'W Vir subclass' else
        If isTypeIICepheid and varPeriodBest < PQ{value=4,unit='d'} and lit_Luminosity < PQ{value=1000,unit='Lsun'}
         then 'BL Her' else
      null endif endif endif
----
subclass

Here

...

is the

...

result:

Image Added