Package: tdtax
Time-domain Astronomy TaxonomyThis project helps us track and version a taxonomy for astronomical time-series sources, for transients (e.g., supernovae and tidal-disruption events), continuous variables (e.g., QSOs) and variable stars (RR Lyrae, δ-Scuti). It is open source and we welcome PRs to change/update this taxonomy as need be.The generic structure is human-readable YAML and looks like:class: Supernova
  comments: |
      This is a diverse class of explosions related
      to the end-of-life of stars.
  links:
    - https://astrobites.org/2016/12/02/classifying-supernovae/
    - https://en.wikipedia.org/wiki/Supernova
  tags: [explosive, transient]
  other names: [SN, sn, sne, supernova, supernovae]
  subclasses:
  - class: Type I
    tags: [hydrogen poor]
    other names: [SN Type I]
    subclasses:
    - class: Ia
      tags: [white dwarf, cosmology, thermonuclear]
      other names: [Ia-p, SN Ia, SNIa, supernovae Ia, SNe Ia]
      subclasses:
      - class: Ia-pec
        tags: [peculiar]
        other names: [SN Ia-pec, SNIa-pec, Ia-p]
     ...There are two ways to describe the class. Either refer to another YAML file:- class: Stellar variable
    subclasses:
      - ref: cataclysmic.yaml
      - ref: eclipsing.yaml
      - ...or define the classes outright:- class: Novae
    tags: [binary]
    subclasses:
      - class: Classical Nova
        other names: []In this case only theclassname is required at each level. Other keys (subclasses,comments,tags,other names, andlinks) are allowed but not required. The schema is created such that the classification hierarchy is nested: each member of thesubclassesarray is itself aclass. The idea oftagsis to allow for a query of differentclassmembers throughout the taxonomy by a similar observation or physical inference (e.g., a search oncosmologycould return bothIaandIIPsupernovae).InstallationUsing pypi:pip install -U tdtaxOr Directly from Github:git clone https://github.com/profjsb/timedomain-taxonomy.git
cd timedomain-taxonomy
pip install .UsageTo get the taxonomy, after installation, as a Pythondict:import tdtax
from tdtax import taxonomyThis will merge all the YAML taxonomy files referred to in thetop.yamlfile and check to make sure that the taxonomy is validate against the schema.To output the current taxonomy to a webpage that can be interactively traversed:import tdtax
tdtax.write_viz(tdtax.vega_taxonomy, outname="viz.html")This will write a fileviz.htmlwhich can be viewed in your browser. Thetagsassociated with each node is shown upon hover.ContributingThe taxonomy is captured starting the filetdtax/top.yaml. It refers to other YAML files which contain classification hierarchies for subclasses.Uponimport tdtaxthe taxonomies are merged into a single JSON tree and this is validated against the schema filetdtax/schema.json. Before a PR, test to make sure that taxonomy validates against the schema by running the tests:pytestThis usesPyYAMLto validate the taxonomy against the schema. When you make a PR, your branch will be automatically be tested with Travis CI.LinksTo learn more about taxonomy of variable stars and explosive transients we suggest the following links:"Variable stars" from CSIRO Astronomy and Space ScienceVariability types from GCVSSupernova classification (astrobites)from A. VillarAcknowledgementsWe thank the Gordon and Betty Moore Foundation for aSoftware SkyPortal grantwhich covered the cost of the development of this project.