rect_slice_csv

macauff.rect_slice_csv(input_folder, output_folder, input_filename, output_filename, rect_coords, padding, astro_cols, mem_chunk_num, header=False)[source]

Convenience function to take a small rectangular slice of a larger .csv catalogue, based on its given orthogonal sky coordinates in the large catalogue.

Parameters:
input_folderstring

Folder in which the larger .csv catalogue is stored.

output_folderstring

Folder into which to save the cutout catalogue.

input_filenamestring

Name, including extension, of the larger catalogue file.

output_filenamestring

Name, including extension, of the cutout catalogue.

rect_coordslist or array of floats

List of coordinates inside which to take the subset catalogue. Should be of the kind [lower_ax1, upper_ax1, lower_ax2, upper_ax2], where ax1 is e.g. Right Ascension and ax2 is e.g. Declination.

paddingfloat

Amount of additional on-sky area to permit outside of rect_coords. In these cases sources must be within padding distance of the rectangle defined by rect_coords by the Haversine formula.

astro_colslist or array of integers

List of zero-index columns representing the orthogonal sky axes, in the sense of [ax1, ax2], with ax1 being e.g. Galactic Longitude and ax2 being e.g. Galactic Latitude, as with rect_coords.

mem_chunk_numinteger

Integer representing the number of sub-slices of the catalogue to load, in cases where the larger file is larger than available memory.

headerboolean, optional

Flag indicating whether .csv file has a header line, giving names of each column, or if the first line of the file is the first line of the dataset.