timewise.wise_data_base.WISEDataBase¶
- class timewise.wise_data_base.WISEDataBase(base_name: str, parent_sample_class, min_sep_arcsec, n_chunks)[source]¶
Base class for WISE Data
- Parameters:
parent_sample_class (ParentSample class) – class for parent sample
base_name (str) – unique name to determine storage directories
min_sep (astropy.units.Quantity) – query region around source for positional query
whitelist_region (astropy.units.Quantity) – region around source where all datapoints are accepted in positional query
n_chunks (int) – number of chunks in declination
parent_wise_source_id_key (str) – key for the WISE source ID in the parent sample
parent_sample_wise_skysep_key (str) – key for the angular separation to the WISE source in the parent sample
parent_sample_default_entries (dict) – default entries for the parent sample
cache_dir (Path) – directory for cached data
cluster_dir (Path) – directory for cluster data
cluster_log_dir – directory for cluster logs
output_dir (Path) – directory for output data
lightcurve_dir (Path) – directory for lightcurve data
plots_dir (Path) – directory for plots
submit_file (Path) – file for cluster submission
tap_jobs (list[str]) – TAP job URLs
queue (multiprocessing.Queue) – queue for cluster jobs
clear_unbinned_photometry_when_binning (bool) – whether to clear unbinned photometry when binning
chunk_map (np.ndarray) – map of chunks
service_url (str) – URL of the TAP service
service (timewise.utils.StableTAPService) – custom TAP service, making sure that the TAP jobs are stable
active_tap_phases (set) – phases of TAP jobs that are still active
running_tap_phases (list) – phases of TAP jobs that are still running
done_tap_phases (set) – phases of TAP jobs that are done
query_types (list) – query types
table_names (pd.DataFrame) – map nice and program table names of WISE data tables
bands (list) – WISE bands
flux_key_ext (str) – key extension for flux keys
flux_density_key_ext (str) – key extension for flux density keys
mag_key_ext (str) – key extension for magnitude keys
luminosity_key_ext (str) – key extension for luminosity keys
error_key_ext (str) – key extension for error keys
band_plot_colors (dict) – plot colors for bands
photometry_table_keymap (dict) – keymap for photometry tables, listing the column names for flux, mag etc for the different WISE data tables
magnitude_zeropoints (dict) – magnitude zeropoints from here
constraints (list) – constraints for TAP queries selecting good datapoints as explained in the explanatory supplements
parent_wise_source_id_key – key for the WISE source ID in the parent sample
parent_sample_wise_skysep_key – key for the angular separation to the WISE source in the parent sample
- __init__(base_name: str, parent_sample_class, min_sep_arcsec, n_chunks)[source]¶
Base class for WISE Data
- Parameters:
base_name (str) – unique name to determine storage directories
parent_sample_class (ParentSample class) – class for parent sample
min_sep_arcsec (float) – query region around source for positional query
n_chunks (int) – number of chunks in declination
tap_url_cache_name (str) – TAP job URLs are stored here to be able to resume them
Methods
__init__(base_name, parent_sample_class, ...)Base class for WISE Data
Adds flux densities to all downloaded lightcurves
add_flux_density(lightcurve, mag_key, ...[, ...])Adds flux densities to a lightcurves
add_luminosity_to_saved_lightcurves(service)Add luminosities to all lightcurves, calculated from flux densities and distance or redshift
bin_lightcurve(lightcurve)Bins a lightcurve
calculate_metadata(service[, chunk_number, ...])Calculates the metadata for all downloaded lightcurves.
Calculates some properties of the lightcurves
calculate_position_mask(lightcurve, ra, dec, ...)Estimated the 90th percentile of the angular separations from the given position.
dump_tap_cache()find_color_correction(w1_minus_w2)Find the color correction based on the W1-W2 color.
get_db_name(table_name[, nice])Get the right table name
get_photometric_data([tables, perc, ...])Load photometric data from the IRSA server for the matched sample.
get_position_mask(service, chunk_number)Get the position mask for a chunk
get_unbinned_lightcurves(chunk_number[, clear])Get the unbinned lightcurves for a given chunk number.
load_data_product(service[, chunk_number, ...])Load data product from disk
load_tap_cache()luminosity_from_flux_density(flux_density, band)Converts a flux density into a luminosity
match_all_chunks([table_name, ...])Match the parent sample to a WISE catalogue and add the result to the parent sample.
plot_lc(parent_sample_idx[, service, ...])Make a pretty plot of a lightcurve
vegamag_to_flux_density(vegamag, band[, ...])This converts the detector level brightness m in Mag_vega to a flux density F
Attributes
active_tap_phasesaperture_correctionsband_plot_colorsband_wavelengthsbandschunk_mapconstraintsdone_tap_phaseserror_key_extflux_density_key_extflux_key_extluminosity_key_extmag_key_extmagnitude_zeropointsmagnitude_zeropoints_correctionsn_chunksparent_sampleparent_sample_wise_skysep_keyparent_wise_source_id_keyphotometry_table_keymapquery_typesrunning_tap_phasesserviceservice_urltable_namestap_cache_filenames