API reference of dsharp_helper

dsharp_helper.I_nu_from_T_b(T_b, lam_obs=0.125)[source]

Calculate Intensity from brightness temperature

dsharp_helper.download_disk(fname, type='image', authenticate=False)[source]

Download the specified disk from the project website (password protected).

fnamestr

file name, such as ‘AS209_continuum.fits’

typestr

specifies the type of file such as image, profile, or SED.

authenticatebool

wether or not authentication should be used (asking for username/passw.)

dsharp_helper.get_datafile(disk, suffix='continuum', type='image', side='N')[source]

Get a path to the local data file, download it if it’s not present.

diskstr

disk name such as ‘AS 209’, …

suffixstr

specifies the version of the image, possibilities include ‘continuum’, ‘CO’

typestr

can be ‘profile’, ‘image’, or ‘SED’

dsharp_helper.get_profile(disk, side='N')[source]

Get the dsharp radial profile.

In the original data release, the profiles calculated the grid in arcseconds incorrectly.

diskstr

name of disk

dsharp_helper.get_sed(disk)[source]
diskstr

name of disk

dsharp_helper.plot_DHSARP_continuum(disk='HD 163296', fname=None, cmap='inferno', dpc=None, ax=None, range=200, p0=[0, 0], **kwargs)[source]

Plot the specified disk where the version is given by the suffix

diskstr

disk name such as ‘AS 209’, …

suffixstr

‘continuum’

fnamestr

to set a specific, possibly non-DSHARP filename

dpcfloat

if set it is used as distance in parsec, otherwise it’s read from the LP_sources data or from input

axNone | axes

in which axes to plot - if none, will create new figure

p0list of length 2

shift of image center in au

rangefloat

plotting range around the center

cmapcmap | string

what’s passed to pcolormesh as cmap

titleNone | string

if given, overwrites title plotted in the figure, which defaults to the name of the disk

Other keywords are passed to plot_fits

returns figure and axes handle

dsharp_helper.plot_fits(fname, ax=None, cmap='inferno', range=None, p0=[0, 0], pixel_size_x=None, pixel_size_y=None, dpc=None, vmin=None, vmax=None, rsqaure=False, n_up=None, title=None, coronagraph_mask=None, fct='pcolormesh', beam=None, autoshift=False, PA=None, stretch=<astropy.visualization.stretch.AsinhStretch object>, image_fct=None)[source]
fnamefloat

path to file

axNone | axes

where to plot the figure, create if None

cmapcolormap

which colormap to pass to pcolormesh

rangeNone | float

which range in mas (or au if dpc given) to plot around the center

maskNone | float

what size of center circle to plot

p0list of two floats

where the center is located in mas

pixel_sizefloat | None

size of a pixel in mas set to None to try and read it from the fits file

dpcfloat

distance in parsec

vmin, vmaxNone | float

which lower and upper bound to use will figure something it out if None

rsquarebool

if true, multiply the intensity with r**2

n_upNone | int

if int: upscale the image to that scale

titlestr

title to plot in top left corner

coronagraph_maskNone | float

size of central circle to e.g. cover coronograph region in mas (or au if dpc given)

beamlist

beam size (FWHM) for convolution in mas

fctstr

which bound method of the axes object to use for plotting. For transparent pdfs, it’s for example better to use the slower pcolor while pcolormesh is much faster.

autoshiftbool

to put the brightest pixel in the center

PANone | float

if float: rotate by this amount

stretchastropy.visualization.BaseStretch instance

use LinearStretch for linear scaling, default for the DSHARP images is AsinhStretch

image_fctNone | callable

pass a function with signature fct(x, y, image) that will be called to process the image.

dsharp_helper.plot_profile(disk)[source]

Plot DSHARP radial profile.

Parameters

disk (str) – name of disk

Returns

Return type

Returns figure and axes object

dsharp_helper.plot_sed(disk)[source]

Plot SED of DSHARP disk.

Parameters

disk (str) – name of disk

Returns

Return type

Returns figure and axes object

dsharp_helper.purge_data(disks=None)[source]

Remove the downloaded DSHARP data files from the package.

disksNone | str | list

can be None, then all are removed can be a str, then the data of that disk is removed can be a list of str, then the data for those disks is removed