rosalia.utils

Functions

MJysr_to_jyarcsec2(flux_mjy_sr)

angular_distance(ra1, dec1, ra2, dec2)

Einsum version of the angular separation function by Astropy einsum_angular_distance_harversine v1: October 17, 2024 - Fastest version compared against numba, or astropy.

check_file_integrity(filenames)

check_fits_integrity(input)

check_number_of_extensions(input_name, ...)

circle_around_position(ra, dec, radius[, ...])

circular_hist(ax, x[, bins, density, ...])

Produce a circular histogram of angles on ax.

convert_ASDF_to_FITS(asdf_list, output)

create_angle_mask(xsize, ysize, q, theta[, ...])

create_custom_wcs(crpix, crval, cdelt[, ...])

create_dummy_exposure(telescope, instrument, ...)

create_dummy_image_with_wcs(ra_cen, dec_cen, ...)

create_radial_mask(xsize, ysize[, q, theta, ...])

delta_angular_separation(ra, dec)

detect_sci_extensions(input_name)

divide_array_in_chunks(array, chunk_size)

download_file(url[, verbose])

Downloads the file described as an url address.

ds9tomask(fname, nx, ny, outname)

erwinspacing(minimum, number[, rate, mode])

execute_cmd(cmd[, verbose])

Executes a shell command line.

exposure_inspector(input_name[, verbose, lite])

exposure_inspector: Inspects and returns critical information about the contents of an exposure telescope. :param input_name: Exposure file to be inspected. It can be a string with the name of the file, a list of files, or a pattern with *. :type input_name: str, list :return: Exposure identity - A dictionary with critical information about the exposure, including pointing (right ascension and declination), position angle, telescope, instrument, detector, filter, and a WCS (Astropy and GWCS). :rtype: dict, pd.DataFrame.

exposure_inspector_asdf(input_name[, ...])

exposure_inspector_fits(input_name[, ...])

exposure_inspector_single(input_name[, ...])

Inspects and returns critical information about the contents of a telescope exposure, stored as a FITS or ADSF file.

find_SCA_EXTNAME(EXTNAME)

find_max_angular_size_of_image(wcs[, ...])

Returns the maximum angular extension of an image.

find_nearest_index(array, value)

find_subposition_EXTNAME(EXTNAME)

flambda_to_fnu(flambda, wavelength)

fnu_to_flambda(fnu, wavelength)

generate_image_interpolator(data[, x, y])

get_astropywcs_info_from_sciexts(filename, ...)

get_data_and_wcs(input_name, ext)

Opens a fits file and returns the data and wcs at a certain extension.

get_keys_from_header(fits_list, index[, ext])

get_parameters_list(fits_list, index[, ext])

get_pixscale(fits_name, ext)

great_circle_ra_dec_shift(theta, phi)

Estimates the new coordinates (ra2, dec2) after moving an angular distance theta (radial direction) in the phi direction (0 deg, North, counterclockwise) along a Great Circle from the Equator (ra=0, dec=0) Adapted from Great Circle navigation: https://en.wikipedia.org/wiki/Great-circle_navigation

hp_resol2nside(resolution)

This program converts a resolution in degrees to the nside parameter of healpix.

interpolate_location_in_fits(fits_name, ext, ...)

This program interpolates the value of a FITS file at the location of the input coordinates (ra, dec).

load_dict(input_name[, verbose])

Load a python object using pickle.

make_ds9_region(ra, dec[, output])

make_profile(image[, radial_mask, ext, ...])

mask_sources(file_name, ext)

measure_maglim(mu_sky, instrument, ...[, ...])

Measure the limiting magnitude of an image given the sky background level, the instrument, filter, telescope and exposure time.

modify_keyword_hdr(input_name, ext, keyword, ...)

position_angle(ra1, dec1, ra2, dec2)

Einsum version of the position angle function by Astropy einsum_angular_distance_harversine v1: October 17, 2024

radec_to_xy(ra, dec, fits_name, ext)

read_ds9reg(fname)

reproject_roman_wfi_fits(input_name, ...)

run_basic_astrodrizzle(file_name)

run_basic_noisechisel(file_name, ext)

run_swarp(pattern, outname[, scale, ...])

run_swarp: This program runs SWARP on the input pattern of files, and generates a mosaic with the output name specified in outname. The pattern can be a string with the name of the file, a list of files, or a pattern with *. The output mosaic will be saved as outname, and if scale is different from 1, a scaled version of the mosaic will be saved as outname with the suffix "_scaled.fits". .

save_dict(dictionary, input_name[, verbose])

Save a python object using pickle.

save_fits(array, name[, header, extname, ...])

separation_and_position_angle(ra1, dec1, ...)

Einsum version of the angular separation function by Astropy einsum_angular_distance_harversine v1: October 17, 2024 - Fastest version compared against numba, or astropy.

sphere_dist(ra1, dec1, ra2, dec2)

A faster separation calculator than astropy solution.

thetaphi_2_radec(theta, phi)

write_parameters_list(fits_list, index, value)

xy_to_radec(x, y, fits_name, ext)