deepdisc.preprocessing.get_data

Attributes

stretch

Q

NORM

Functions

get_psf_itpl(tract, patch, n_blocks, sp, band)

get_psf(tract, patch, n_blocks, sp, catalog)

get_DC2_data(dirpath[, filters, tract, patch, coord, ...])

Get HSC data given tract/patch info or SkyCoord

get_HSC(dirpath[, filters, tract, patch, coord, ...])

Get HSC data given tract/patch info or SkyCoord

get_DC2_data_alltracts(dirpath[, filters, tract, ...])

Get HSC data given tract/patch info or SkyCoord

get_DC2_psf_alltracts(dirpath[, filters, tract, ...])

Get HSC data given tract/patch info or SkyCoord

get_centers(sub_shape, n)

get_cutout(dirpath, tract, patch, sp[, nblocks, ...])

get_cutout_HSC(dirpath, tract, patch, sp[, nblocks, ...])

get_cutout_cat(dirpath, dall, tract, patch, sp[, ...])

WARNING!!!!!

Module Contents

stretch = 1[source]
Q = 5[source]
NORM[source]
get_psf_itpl(tract, patch, n_blocks, sp, band)[source]
get_psf(tract, patch, n_blocks, sp, catalog)[source]
get_DC2_data(dirpath, filters=['u', 'g', 'r', 'i', 'z', 'y'], tract=10054, patch=[0, 0], coord=None, cutout_size=[128, 128])[source]

Get HSC data given tract/patch info or SkyCoord

Parameters:
  • dirpath (str) – Path to HSC image file directory

  • filters (list) – A list of filters for your images. Default is [‘g’, ‘r’, ‘i’].

  • tract (int) – An integer used for specifying the tract. Default is 10054|

  • patch ([int, int]) – Patch #,#. Default is [0,0]

  • coord (SkyCoord) – Astropy SkyCoord, when specified, overrides tract/patch info and attempts to lookup HSC filename from ra, dec. Default is None

  • cutout_size ([int, int]) – Size of cutout to use (set to None for no cutting). Default is [128, 128]

  • form (The image filepath is in the) – {dirpath}/deepCoadd/HSC-{filter}/{tract}/{patch[0]},{patch[1]}/calexp-HSC-{filter}-{tract}-{patch[0]},{patch[1]}.fits

Returns:

data – HSC data array with dimensions [filters, N, N]

Return type:

ndarray

get_HSC(dirpath, filters=['G', 'R', 'I', 'Z', 'Y'], tract=10054, patch=[0, 0], coord=None, cutout_size=[128, 128], get_psf=False)[source]

Get HSC data given tract/patch info or SkyCoord

Parameters:
  • dirpath (str) – Path to HSC image file directory

  • filters (list) – A list of filters for your images. Default is [‘g’, ‘r’, ‘i’].

  • tract (int) – An integer used for specifying the tract. Default is 10054|

  • patch ([int, int]) – Patch #,#. Default is [0,0]

  • coord (SkyCoord) – Astropy SkyCoord, when specified, overrides tract/patch info and attempts to lookup HSC filename from ra, dec. Default is None

  • cutout_size ([int, int]) – Size of cutout to use (set to None for no cutting). Default is [128, 128]

  • form (The image filepath is in the) – {dirpath}/deepCoadd/HSC-{filter}/{tract}/{patch[0]},{patch[1]}/calexp-HSC-{filter}-{tract}-{patch[0]},{patch[1]}.fits

Returns:

data – DC2 data array with dimensions [filters, N, N]

Return type:

ndarray

get_DC2_data_alltracts(dirpath, filters=['u', 'g', 'r', 'i', 'z', 'y'], tract=10054, patch=[0, 0], coord=None, cutout_size=[128, 128], get_psf=False)[source]

Get HSC data given tract/patch info or SkyCoord

Parameters:
  • dirpath (str) – Path to HSC image file directory

  • filters (list) – A list of filters for your images. Default is [‘g’, ‘r’, ‘i’].

  • tract (int) – An integer used for specifying the tract. Default is 10054|

  • patch ([int, int]) – Patch #,#. Default is [0,0]

  • coord (SkyCoord) – Astropy SkyCoord, when specified, overrides tract/patch info and attempts to lookup HSC filename from ra, dec. Default is None

  • cutout_size ([int, int]) – Size of cutout to use (set to None for no cutting). Default is [128, 128]

  • form (The image filepath is in the) – {dirpath}/deepCoadd/HSC-{filter}/{tract}/{patch[0]},{patch[1]}/calexp-HSC-{filter}-{tract}-{patch[0]},{patch[1]}.fits

Returns:

data – DC2 data array with dimensions [filters, N, N]

Return type:

ndarray

get_DC2_psf_alltracts(dirpath, filters=['u', 'g', 'r', 'i', 'z', 'y'], tract=10054, patch=[0, 0], coord=None, cutout_size=[128, 128], get_psf=False)[source]

Get HSC data given tract/patch info or SkyCoord

Parameters:
  • dirpath (str) – Path to HSC image file directory

  • filters (list) – A list of filters for your images. Default is [‘g’, ‘r’, ‘i’].

  • tract (int) – An integer used for specifying the tract. Default is 10054|

  • patch ([int, int]) – Patch #,#. Default is [0,0]

  • coord (SkyCoord) – Astropy SkyCoord, when specified, overrides tract/patch info and attempts to lookup HSC filename from ra, dec. Default is None

  • cutout_size ([int, int]) – Size of cutout to use (set to None for no cutting). Default is [128, 128]

  • form (The image filepath is in the) – {dirpath}/deepCoadd/HSC-{filter}/{tract}/{patch[0]},{patch[1]}/calexp-HSC-{filter}-{tract}-{patch[0]},{patch[1]}.fits

Returns:

data – HSC data array with dimensions [filters, N, N]

Return type:

ndarray

get_centers(sub_shape, n)[source]
get_cutout(dirpath, tract, patch, sp, nblocks=4, filters=['u', 'g', 'r', 'i', 'z', 'y'], plot=False, get_psf=True)[source]
get_cutout_HSC(dirpath, tract, patch, sp, nblocks=4, filters=['G', 'R', 'I', 'Z', 'Y'], plot=False, get_psf=True)[source]
get_cutout_cat(dirpath, dall, tract, patch, sp, nblocks=4, filters=['u', 'g', 'r', 'i', 'z', 'y'])[source]

WARNING!!!!! It is not efficient to have the full catalog as input when doing multiprocesing. Keep it in the top level process