generate_trilegal_histogram_cube¶
- macauff.generate_trilegal_histogram_cube(auf_points, auf_file_path, tri_set_name, tri_filt_names, tri_filt_num, tri_maglim_faint, tri_num_faint, tri_download_flag, auf_region_frame, auf_region_type, min_area, min_mag, d_mag, al_avs, avs=None, avs_random_sample_radius=None)[source]¶
Convenience function to generate the hyper-cube and accompanying ID array that wraps the TRILEGAL-simulation-generated sky density maps, generated for a series of sky pointings and filters relevant to a particular cross-match.
- Parameters:
- auf_pointslist of lists or numpy.ndarray
Following the same inputs as
CrossMatch, either a list of two-element lists or (N, 2)-shape array, or a six-element list that determines the start-stop-element of two orthogonal sky coordinates that expand into a grid of positions.- auf_file_pathstring
Full path, including filename, out to which all TRILEGAL files will be saved. Will have two
{}format options inserted into the string that sky coordinates use to distinguish each pointing call.- tri_set_namestring
The name of the filterset that should have a TRILEGAL simulation called for it.
- tri_filt_nameslist of strings
The names of the filters, out of all of those generated in
tri_set_name, that we wish to extract differential sky counts for.- tri_filt_numint
The one-indexed filter index, for all magnitudes simulated in
tri_set_name, that defines the maximum magnitude used in the simulation.- tri_maglim_faintfloat
Corresponding magnitude down to which the
tri_filt_numfilter is to be simulated.- tri_num_faintint
Number of objects, roughly, to simulate for each call, scaling by input sky area, down to the
tri_maglim_faintlimit.- tri_download_flagboolean
Flag indicating whether to re-download TRILEGAL files already on disk (
True), or re-use those saved already (False).- auf_region_framestring, “equatorial” or “galactic”
Sky coordinate frame, either in galactic coordinates, l and b, or equatorial coordinates, right ascension and declination.
- auf_region_typestring, “rectangle” or “points”
Flag for whether
auf_pointsis defined by two-1D linspace arrays that expand into a grid, or a series of coordinate tuples.- min_areafloat
Area to begin requesting from the TRILEGAL simulator, the smallest acceptable region coverage for e.g. good number statistics on the results. Area will be capped at 10 square degrees on simulation call.
- min_maglist or numpy.ndarray of floats
For each filter, the brightest magnitude it is necessary to generate TRILEGAL densities for.
- d_magfloat
Width of the magnitude bins to generate density histograms with.
- al_avslist or numpy.ndarray of floats
The extinction vector, \(\frac{A_\lambda}{A_V}\), for each filter in
tri_filt_names.- avslist of list of floats, or numpy.ndarray, optional
Either a nested list or shape (N, M) array of V-band extinctions, such that
avs[i]is a list of the reddenings for thei``th position in ``auf_points. If not supplied then it will be computed at each coord; supplying separately allows for a grid to be passed for eachauf_pointcoordinate, to represent differential reddening in each sky region.- avs_random_sample_radiusfloat
If
avsisNoneand this parameter is provided, scatter around theauf_pointwill be generated for each sky coordinate, in degrees, to generate an approximate differential reddening vector.
- Returns:
- arraynumpy.ndarray
Shape (N, 2) array, containing the sky coordinates for each pointing.
- cubenumpy.ndarray
Shape (N, M, X, 3) array, containing the counts per magnitude per square degree histogram, left-hand magnitude bins, and bin widths, for each NxM sky-filter combination.