rect_slice_npy

macauff.rect_slice_npy(input_folder, output_folder, rect_coords, padding, mem_chunk_num)[source]

Convenience function to take a small rectangular slice of a larger catalogue, represented by three or four binary .npy files, based on its given orthogonal sky coordinates in the large catalogue.

Parameters:
input_folderstring

Folder in which the larger .npy files representing the catalogue are stored.

output_folderstring

Folder into which to save the cutout catalogue .npy files.

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.