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

Ict 21785 freq units #112

Merged
merged 6 commits into from
Mar 12, 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
2 changes: 1 addition & 1 deletion cone/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
implementation 'org.opencadc:cadc-uws-server:[1.2.14,1.3.0)'
implementation 'org.opencadc:cadc-vosi:[1.3.4,2.0)'

runtimeOnly 'org.opencadc:alma-lib:[2.2.0,2.3.0)'
runtimeOnly 'org.opencadc:alma-lib:' + version
}

war {
Expand Down
2 changes: 1 addition & 1 deletion properties.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sourceCompatibility = 17

// Applies to all web applications and the alma-lib library.
version = '2.3.0'
version = '2.3.1'

task printVersion {
doLast {
Expand Down
6 changes: 4 additions & 2 deletions tap/src/main/resources/sql/alma_obscore_view.sql
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ CREATE OR REPLACE FORCE VIEW obscore (
science.gal_latitude,
science.band_list,
-- Convert frequency_resolution to metres as per ObsCore expectations.
CASE WHEN science.frequency_resolution IS NOT NULL AND science.frequency_max IS NOT NULL AND science.frequency_min IS NOT NULL
CASE WHEN energy.frequency_max IS NOT NULL AND energy.frequency_min IS NOT NULL AND energy.resolution_max IS NOT NULL AND energy.resolution_min IS NOT NULL
THEN
(0.25 * 2.99792458e+11 * science.frequency_resolution / ((science.frequency_min + science.frequency_max) * (science.frequency_min + science.frequency_max)))
-- 1.49896229e-7 is the condensed unit conversion to Hz
-- c / 1e18 * 1e3 / 2 (299792458.0 / 1e18 * 1e3 / 2)
1.49896229e-7 / (energy.frequency_max * energy.frequency_min) * (energy.resolution_max + energy.resolution_min)
ELSE
NULL
END,
Expand Down
Loading
Loading