GALEXField¶
This is a short tutorial on the GALEXField
class. This is an implementation of
VASCA’s BaseField
tailored to the specific needs of GALEX archival data. It
serves first and foremost as the interface between the instrument specifics, like raw
data handling and nomenclature, and the rest of VASCA’s functionality. Important are
the loading functions that download raw data from MAST
and load already processed field data into memory.
Example¶
Let’s load GALEX field data that is already downloaded (used for unit testing)
from pathlib import Path
from vasca.field import GALEXField
from vasca.resource_manager import ResourceManager
This shows the directories of raw data for two GALEX fields. The directories are named after their observation ID. This is used as a globally unique ID across all GALEX data.
rm = ResourceManager()
test_dir = rm.get_path("test_resources", "vasca")
[x.name for x in Path(test_dir).glob("*") if x.is_dir()]
['6388191295067652096', '6371091720297250816']
We’ll take the first one and insatiate a GALEXField
.
fd = GALEXField.load(
gfield_id=6371091720297250816,
obs_filter="NUV",
method="MAST_LOCAL",
load_products="TABLES",
data_path=test_dir,
visits_data_path=rm.get_path("gal_visits_list", "vasca"),
)
Using the TableCollection.info
method one can see all data tables the field contains.
fd.info()
Show code cell output
tt_fields:
<Table length=1>
name dtype unit description
----------- ------- ---- -------------------------------------------------------
field_id bytes32 Field source ID number
field_name bytes32 Field name
project bytes32 Field project, typically survey name
ra float64 deg Sky coordinate Right Ascension (J2000)
dec float64 deg Sky coordinate Declination (J2000)
observatory bytes22 Telescope of the observation (e.g. GALEX)
obs_filter bytes8 Filter of the observation (e.g. NUV)
fov_diam float32 deg Field radius or box size (depending on the observatory)
sel bool Selection of rows for VASCA analysis
{'DATAPATH': 'None', 'INFO': 'Field information table'}
tt_visits:
<Table length=2>
name dtype unit description
-------------- ------- ---- -----------------------------------------
vis_id uint64 Visit ID number
time_bin_start float64 d Visit exposure start date and time in MJD
time_bin_size float32 s Visit exposure time in s
sel bool Selection of rows for VASCA analysis
obs_filter_id int32 Observation filter ID number
ra float64 deg Sky coordinate Right Ascension (J2000)
dec float64 deg Sky coordinate Declination (J2000)
{'INFO': 'Visit information table'}
tt_detections:
<Table length=8484>
name dtype unit description
-------------- ------- -------- ------------------------------------------------------------------------------------------------
vis_id uint64 Visit ID number
fd_src_id int32 Source ID associated to the visit detection
ra float64 deg Sky coordinate Right Ascension (J2000)
dec float64 deg Sky coordinate Declination (J2000)
pos_err float32 arcsec Sky coordinate position error
flux float32 1e-06 Jy Flux density
flux_err float32 1e-06 Jy Flux density error
flux_app_ratio float32 Flux ratio measured at a different apertures (3.8 arcsec / 6 arcsec radius for GALEX)
s2n float32 Flux signal to noise
obs_filter_id int32 Observation filter ID number
sel bool Selection of rows for VASCA analysis
r_fov float32 deg Distance from center of FOV in degrees
artifacts int64 Logical OR of artifact flags
class_star float32 Point-source probability: 0.0 (resolved), 1.0 (unresolved, mcat file filter_CLASS_STAR variable)
chkobj_type int32 Detection matched to a known star (bright_match=1, mcat file chkobj_type variable)
size_world float32 arcsec Mean RMS of the ellipse size: (major axis + minor axis) / 2
ellip_world float32 Ellipticity of the detection or source
flux_auto float32 Jy Flux from SExtractor auto option
flux_auto_err float32 Jy Flux error from a fixed circular aperture (3.8 arcsec radius for GALEX)
det_id int64 Reference source ID number
E_bv float32 Galactic reddening expressed as E(B-V)
{'INFO': 'Visit detections table', 'PRECUTS': 'List of pre-cuts'}
tt_coadd_detections:
<Table length=4914>
name dtype unit description
-------------- ------- -------- ------------------------------------------------------------------------------------------------
det_id int64 Reference source ID number
ra float64 deg Sky coordinate Right Ascension (J2000)
dec float64 deg Sky coordinate Declination (J2000)
pos_err float32 arcsec Sky coordinate position error
flux float32 1e-06 Jy Flux density
flux_err float32 1e-06 Jy Flux density error
flux_app_ratio float32 Flux ratio measured at a different apertures (3.8 arcsec / 6 arcsec radius for GALEX)
s2n float32 Flux signal to noise
obs_filter_id int32 Observation filter ID number
sel bool Selection of rows for VASCA analysis
r_fov float32 deg Distance from center of FOV in degrees
artifacts int64 Logical OR of artifact flags
class_star float32 Point-source probability: 0.0 (resolved), 1.0 (unresolved, mcat file filter_CLASS_STAR variable)
chkobj_type int32 Detection matched to a known star (bright_match=1, mcat file chkobj_type variable)
size_world float32 arcsec Mean RMS of the ellipse size: (major axis + minor axis) / 2
ellip_world float32 Ellipticity of the detection or source
flux_auto float32 Jy Flux from SExtractor auto option
flux_auto_err float32 Jy Flux error from a fixed circular aperture (3.8 arcsec radius for GALEX)
E_bv float32 Galactic reddening expressed as E(B-V)
{'INFO': 'Reference detections table', 'PRECUTS': 'List of pre-cuts'}
For convenience, some important attributes can be accessed directly:
For example, the total exposure time over all visits or the center coordinate:
fd.time_bin_size_sum
fd.center
<SkyCoord (ICRS): (ra, dec) in deg
(291.31877036, 54.25174628)>
All available convenience attributes:
Show code cell source
important_pars = {
"field_id": "Unique field ID",
"field_name": "Optional name if the field",
"ra": "Right ascention coordinate (J2000)",
"dec": "Declination coordinate (J2000)",
"fov_diam": "Size of the field of view ",
"observatory": "The instrument name",
"obs_filter": "Observation band-pass filter",
"center": "Center coordinate on the sky",
"nr_vis": "Number of observational visits",
"time_bin_size_sum": "Total exposure summed over all visits",
"time_start": "Beggining of the first observation",
"time_stop": "End of the last obseration",
}
for par, desc in important_pars.items():
print(f"{par:<20} {str(getattr(fd, par)):>30} {desc:>60}")
field_id GNU6371091720297250816 Unique field ID
field_name AIS_5_1_40 Optional name if the field
ra 291.31877036165906 deg Right ascention coordinate (J2000)
dec 54.2517462844149 deg Declination coordinate (J2000)
fov_diam 1.2000000476837158 deg Size of the field of view
observatory GALEX The instrument name
obs_filter NUV Observation band-pass filter
center <SkyCoord (ICRS): (ra, dec) in deg
(291.31877036, 54.25174628)> Center coordinate on the sky
nr_vis 2 Number of observational visits
time_bin_size_sum 192.0 s Total exposure summed over all visits
time_start 53991.48782407407 Beggining of the first observation
time_stop 54087.62482638889 End of the last obseration