scubes

scubes.constants module

scubes.control module

class scubes.control.control(args)

Bases: object

Class for handling control parameters and configurations.

Parameters:

args (argparse.ArgumentParser) – An object containing arguments for control.

ra

Right Ascension coordinate.

Type:

float

dec

Declination coordinate.

Type:

float

galaxy

Galaxy identifier.

Type:

str

tile

Tile identifier.

Type:

str

size

Size of the image.

Type:

int

verbose

Verbosity level for printing debug information.

Type:

int

prefix_filename

Filename prefix based on galaxy, tile, and size.

Type:

str

_parse_coords()

Convert the input right ascension and declination to degrees.

scubes.core module

class scubes.core.SCubes(args)

Bases: object

Class for creating S-PLUS galaxy data cubes (S-CUBES).

args

Parsed command-line arguments.

Type:

Namespace

_conn

Connection object to the S-PLUS Cloud.

Type:

object

control

Control object for handling specific arguments and directories.

Type:

_control

galaxy

Galaxy object representing galaxy information.

Type:

_galaxy

wl__b

Array of effective wavelengths for each band.

Type:

ndarray

flam_unit

Unit for flux density.

Type:

Unit

fnu_unit

Unit for flux.

Type:

Unit

flam__b

Array of flux density values.

Type:

ndarray

fnu__b

Array of flux values.

Type:

ndarray

headers__b

List of headers for each band.

Type:

list

See also

_control, _galaxy, control

add_magzp_headers()

Add magnitude zero-point values to the image headers.

calibrate_stamps()

Calibrate the downloaded stamps.

check_zero_points()

Check if zero-point magnitudes are available.

property conn

Get the connection object to the S-PLUS Cloud.

Returns:

Connection object to the S-PLUS Cloud.

Return type:

object

create_cube(flam_scale=None)

Create a data cube from S-PLUS galaxy stamps.

Parameters:

flam_scale (float, optional) – Scaling factor for flux density, by default None.

Raises:

OSError – Raises an error if the cube already exists and redo is not specified.

create_metadata_hdu(keys=None)

Create a metadata table HDU.

Parameters:

keys (list, optional) – List of header keys, by default None.

Returns:

Metadata table HDU.

Return type:

BinTableHDU

create_weights_mask_hdu()

Create a weights mask HDU.

Returns:

Weight mask HDU.

Return type:

ImageHDU

download_data()
get_detection_image()

Download the detection image.

get_lupton_rgb()

Download the Lupton RGB image.

get_stamps()

Download stamps for each band.

get_zero_points()

Get zero points from the specified table.

get_zero_points_correction()

Get corrections for zero points.

XXX: 2025-03-14 - EADL@RV

zp correction image is based on a 9200 x 9200 image, the valid CCD area. When creating stamps, the stamp FITS header maps the x0, y0 position on the original 11000 x 11000 field image. This creates a huge problem on correcting stamps.

remove_downloaded_data()

Remove downloaded stamp, detection image, and Lupton RGB image files.

spectra(flam_scale=None)

Calculate the spectra arrays.

Parameters:

flam_scale (float, optional) – Scaling factor for flux density, by default None.

stamp_WCS_to_cube_header(header)

Convert WCS information from stamp to cube header.

Parameters:

header (Header) – FITS header containing WCS information.

Returns:

Cube header with updated WCS information.

Return type:

Header

scubes.entry_points module

scubes.entry_points.scubes()

Entry-point function for creating S-PLUS galaxy data cubes (S-CUBES).

Raises:

SystemExit – If SExtractor is not found.

Return type:

None

scubes.entry_points.scubes_argparse(args)

A particular parser of the command-line arguments for scubes entry-point script.

Parameters:

args (argparse.Namespace) – Command-line arguments parsed by argparse.ArgumentParser.parse_args()

Returns:

Command-line arguments parsed.

Return type:

argparse.Namespace

scubes.entry_points.scubes_filters()

Print the S-PLUS filters information.

Raises:

SystemExit – If masterlist not found

Return type:

None

scubes.entry_points.scubesml()

Entry-point function for creating S-PLUS galaxy data cubes (S-CUBES) using the masterlist for the input arguments.

Raises:

SystemExit – If masterlist not found

Return type:

None

scubes.entry_points.scubesml_argparse(args)

A particular parser of the command-line arguments for scubesml entry-point script.

Parameters:

args (argparse.Namespace) – Command-line arguments parsed by argparse.ArgumentParser.parse_args()

Returns:

Command-line arguments parsed.

Return type:

argparse.Namespace

scubes.headers module

scubes.headers.get_author(header)

Get the author associated with a given header.

Parameters:

header (astropy.io.fits.Header) – FITS header.

Returns:

Author identifier.

Return type:

str

scubes.headers.get_key(ikey, author)

Get the key associated with a specific keyword for a given author.

Parameters:
  • ikey (str) – Keyword to retrieve.

  • author (str) – Author identifier.

Returns:

Key associated with the keyword for the specified author.

Return type:

str

scubes.headers.get_keys(author)

Get the dictionary of keys associated with a specific author.

Parameters:

author (str) – Author identifier.

Returns:

Dictionary of keys for the specified author or None if not found.

Return type:

dict or None

scubes.mask_stars module

Subpackages