Match Spectral
MATCH_SPECTRAL
See the source code.
This test verifies that region spectral profiles are consistent across spatially and spectrally matched images in different formats (FITS and CASA).
Frontend sends: OPEN_FILE (
OpenFile) for four filesFile 1 (FITS CO 2-1):
directory = "set_QA" file = "HD163296_CO_2_1.fits" file_id = 100 render_mode = RASTER
File 2 (FITS 13CO):
directory = "set_QA" file = "HD163296_13CO_2-1.fits" file_id = 101 render_mode = RASTER
File 3 (FITS C18O):
directory = "set_QA" file = "HD163296_C18O_2-1.fits" file_id = 102 render_mode = RASTER
File 4 (CASA CO 2-1):
directory = "set_QA" file = "HD163296_CO_2_1.image" file_id = 103 render_mode = RASTER
Backend returns: OPEN_FILE_ACK for each file
Frontend sends: SET_REGION (
SetRegion) on file 100file_id = 100 region_id = 1 region_type = RECTANGLE control_points = [{x: 200, y: 200}, {x: 200, y: 200}] rotation = 0
Frontend sends: SET_SPECTRAL_REQUIREMENTS (
SetSpectralRequirements) for each filefile_id = <100-103> region_id = 1 spectral_profiles = [{coordinate: "z", stats_types: [Mean]}]
Backend returns: SPECTRAL_PROFILE_DATA (
SpectralProfileData) for each file
Check 1: the SPECTRAL_PROFILE_DATA should satisfy:
All region_id values equal 1
The spectral profile for file 100 (FITS) is identical to the profile for file 103 (CASA) — same data in different formats should produce the same results
After rotating the region to 30 degrees:
Frontend sends: SET_REGION (
SetRegion) with updated rotationfile_id = 100 region_id = 1 region_type = RECTANGLE control_points = [{x: 200, y: 200}, {x: 200, y: 200}] rotation = 30
Backend returns: SPECTRAL_PROFILE_DATA for each file (progress = 1)
Check 2: the SPECTRAL_PROFILE_DATA should satisfy:
All region_id values match the requirements
The rawValuesFp64 arrays for file 100 (FITS) and file 103 (CASA) are element-by-element identical