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

Now requiring line_reference. #12

Merged
merged 1 commit into from
Nov 21, 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
6 changes: 4 additions & 2 deletions LineTAP.tex
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ \subsection{Non-Use Cases}
\rowsep
\texttt{xsams\_uri} \hfil\break\ucd{meta.ref} & text & \raggedright A URI for a full XSAMS description of this line.\tabularnewline
\rowsep
\texttt{line\_reference} \hfil\break\ucd{meta.ref} & text & \raggedright Reference to the source of the line data; this could be a bibcode, a DOI, or a plain URI.\tabularnewline
\texttt{line\_reference} \hfil\break\ucd{meta.ref} & \textbf{text} & \raggedright Reference to the source of the line data; this could be a bibcode, a DOI, or a plain URI.\tabularnewline

% /GENERATED
\sptablerule
Expand Down Expand Up @@ -375,7 +375,9 @@ \section{Spectral Line Data}\label{sect:quantities}
return exactly one transition, and it MUST be in XSAMS version 1.

\item \texttt{line\_reference} Information about the source of the line data,
like an URI, DOI or bibcode.
like an URI, DOI or bibcode. This is a mandatory column. Users should
have a guaranteed way of finding out where a piece of information came
from and where additional information is available.

\end{itemize}

Expand Down
10 changes: 5 additions & 5 deletions make-columns-table.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

import pyvo

NON_NULL_COLUMNS = {'title', 'vacuum_wavelength'}
NON_NULL_COLUMNS = {'title', 'vacuum_wavelength', 'line_reference'}
TYPE_MAP = {
("char", "*"): "text",
("int", ""): "integer",
("double", ""): "float",}


def e(tx):
"""returns tx with TeX's standard active (and other magic) characters
"""returns tx with TeX's standard active (and other magic) characters
escaped.
"""
return tx.replace("\\", "$\\backslash$"
Expand Down Expand Up @@ -49,7 +49,7 @@ def main():
for row in svc.run_sync("""
select column_name, description, unit, ucd, datatype, arraysize
from tap_schema.columns
where
where
table_name='casa_lines.line_tap'
and std=1
order by column_index"""):
Expand All @@ -61,8 +61,8 @@ def main():

parts.append("&")
parts.append(get_type(
row["datatype"],
row["arraysize"],
row["datatype"],
row["arraysize"],
row["column_name"] in NON_NULL_COLUMNS))

parts.append("&")
Expand Down
Loading