Skip to content

Plotting Tools

chips.plots.Annotation

Bases: object

An object class that holds annotation details that put on a disk image. The attibutes of this class is similar to maplotlib.pyplot.ax.text().

Attributes:

Name Type Description
txt str

Text to be annotated.

xloc float

X-location of the text.

yloc float

Y-location of the text.

ha str

Horizontal Alignment of the text.

va str

Vertical Alignment of the text.

fontdict dict

Font dictionary containg text styles.

rotation float

Text rotation in degress (0-360).

chips.plots.ImagePalette

Bases: object

An object class that holds the figures and axis to draw.

Attributes:

Name Type Description
figsize Tuple

Figure size (width, height)

dpi int

Dots per linear inch.

nrows int

Number of axis rows in a figure palete.

ncols int

Number of axis colums in a figure palete.

font_family str

Font familly.

sharex str

Shareing X-axis ['all', 'row', 'col', 'none'].

sharey str

Shareing X-axis ['all', 'row', 'col', 'none'],

vert np.array

Vertices of rectange to zoom in a specific region [lower left, upper right points].

close()

Methods to close image palete.

Returns:

Type Description
None

Method returns None.

save(fname, hspace=0.01, wspace=0.01, bbox_inches='tight')

Methods to save the image into local system.

Parameters:

Name Type Description Default
fname str

File name to save the image (expected file formats png, bmp, jpg, pdf, etc).

required
hspace float

Subplot adjust height space.

0.01
wspace float

Subplot adjust width space.

0.01
bbox_inches str

Figure axis boxes.

'tight'

Returns:

Type Description
None

Method returns None.

draw_colored_disk(map, pixel_radius, data=None, resolution=4096, ticker=None, alpha=1, draw_circle=True, axis_off=True)

Plotting colored solar disk images in the axis.

Parameters:

Name Type Description Default
map sunpy.map.Map

Sunpy map level dataset to plt solar disk.

required
pixel_radius int

Radious of the solar disk.

required
data np.array

2D numpy array of dataset to plot (if not given map.data is plotted).

None
resolution int

Image resolution (typically 4k).

4096
ticker int

Axis ticker.

None
alpha float

Figure transparency.

1
draw_circle bool

Draw the solar disk.

True
axis_off bool

Off the axis.

True

Returns:

Type Description
None

Method returns None.

draw_grayscale_disk(map, pixel_radius, data=None, resolution=4096, ticker=None, alpha=1, draw_circle=True, axis_off=True)

Plotting gray-scaled solar disk images in the axis.

Parameters:

Name Type Description Default
map sunpy.map.Map

Sunpy map level dataset to plt solar disk.

required
pixel_radius int

Radious of the solar disk.

required
data np.array

2D numpy array of dataset to plot (if not given map.data is plotted).

None
resolution int

Image resolution (typically 4k).

4096
ticker int

Axis ticker.

None
alpha float

Figure transparency.

1
draw_circle bool

Draw the solar disk.

True
axis_off bool

Off the axis.

True

Returns:

Type Description
None

Method returns None.

ovearlay_localized_regions(regions, prob_lower_lim=0, add_color_bar=True, cmap='Spectral_r', ticker=None, convert_bgc_black=False, axis_off=True)

Overlay the identified CH regions on top of the Disk maps.

Parameters:

Name Type Description Default
regions List[dict]

List of dictonary holding all the information of identified CH regions.

required
prob_lower_lim float

Minimum limit of the color bar.

0
add_color_bar bool

If true plot the probability colorbar on right.

True
cmap str

Color map in string - refer matplotlib for details.

'Spectral_r'
ticker int

Axis ticker.

None
convert_bgc_black bool

Convert BGC color black.

False
axis_off bool

Off the axis.

True

Returns:

Type Description
None

Method returns None.

plot_binary_localized_maps(regions, pixel_radius, resolution=4096, axis_off=True)

Method to add binary CH region maps.

Parameters:

Name Type Description Default
regions List[dict]

List of dictonary holding all the information of identified CH regions.

required
pixel_radius int

Radious of the solar disk.

required
resolution int

Image resolution (typically 4k).

4096
axis_off bool

Off the axis.

True

Returns:

Type Description

Method returns None.

draw_colored_synoptic_map(map, wavelength, ticker=None, alpha=1)

Plotting colored solar syoptic images in the axis.

Parameters:

Name Type Description Default
map sunpy.map.Map

Sunpy map level dataset to plt solar synoptic maps.

required
wavelength int

Wave length of the disk image [171/193/211].

required
ticker int

Axis ticker.

None
alpha float

Figure transparency (0,1).

1

Returns:

Type Description
None

Method returns None.

ovearlay_localized_synoptic_regions(regions, prob_lower_lim=0, add_color_bar=True, cmap='Spectral_r')

Overlay the identified CH regions on top of the synoptic maps.

Parameters:

Name Type Description Default
regions List[dict]

List of dictonary holding all the information of identified CH regions.

required
prob_lower_lim float

Minimum limit of the color bar.

0
add_color_bar bool

If true plot the probability colorbar on right.

True
cmap str

Color map in string - refer matplotlib for details.

'Spectral_r'

Returns:

Type Description
None

Method returns None.

plot_binary_localized_synoptic_maps(regions)

Method to add binary CH region synoptic maps.

Parameters:

Name Type Description Default
regions List[dict]

List of dictonary holding all the information of identified CH regions.

required

Returns:

Type Description

Method returns None.

annotate(annotations, ticker=0, axis_off=False)

Method to add text annotations.

Parameters:

Name Type Description Default
annotations List[chips.plots.Annotation]

List of annotations.

required
ticker int

Axis number to put all the annotations.

0
axis_off bool

Off the axis.

False

Returns:

Type Description
None

Method returns None.

chips.plots.ChipsPlotter

Bases: object

An object class that holds the summary plots.

Attributes:

Name Type Description
disk chips.fetch.SolarDisk

Solar disk object that holds all information for drawing.

figsize Tuple

Figure size (width, height)

dpi int

Dots per linear inch.

nrows int

Number of axis rows in a figure palete.

ncols int

Number of axis colums in a figure palete.

parameter_details dict

Parameters containing xloc, yloc, and text body for figure

create_diagonestics_plots(fname=None, figsize=None, dpi=None, nrows=None, ncols=None, prob_lower_lim=0.8, solid_fill=True, vert=None)

Method to create diagonestics plots showing different steps of CHIPS.

Attributes:

Name Type Description
fname str

File name to save the image (expected file formats png, bmp, jpg, pdf, etc).

figsize Tuple

Figure size (width, height)

dpi int

Dots per linear inch.

nrows int

Number of axis rows in a figure palete.

ncols int

Number of axis colums in a figure palete.

prob_lower_lim float

Minimum limit of the color bar.

solid_fill bool

Create solid filled graph or contours.

vert np.array

Vertices of rectange to zoom in a specific region [lower left, upper right points].

Returns:

Type Description
None

Method returns None.

create_output_stack(fname=None, figsize=None, dpi=None, nrows=None, ncols=None, solid_fill=True, vert=None)

Method to create stack plots showing different binary CH regional plots identified by CHIPS.

Attributes:

Name Type Description
fname str

File name to save the image (expected file formats png, bmp, jpg, pdf, etc).

figsize Tuple

Figure size (width, height)

dpi int

Dots per linear inch.

nrows int

Number of axis rows in a figure palete.

ncols int

Number of axis colums in a figure palete.

solid_fill bool

Create solid filled graph or contours.

vert np.array

Vertices of rectange to zoom in a specific region [lower left, upper right points].

Returns:

Type Description
None

Method returns None.

chips.plots.SynopticChipsPlotter

Bases: object

An object class that holds the summary plots for synoptic map analysis.

Attributes:

Name Type Description
synoptic_map chips.fetch.SynopticMap

Solar synoptic map object that holds all information for drawing.

figsize Tuple

Figure size (width, height)

dpi int

Dots per linear inch.

nrows int

Number of axis rows in a figure palete.

ncols int

Number of axis colums in a figure palete.

create_synoptic_diagonestics_plots(fname=None, figsize=None, dpi=None, nrows=None, ncols=None, prob_lower_lim=0.8)

Method to create diagonestics plots showing different steps of CHIPS for Synoptic maps.

Attributes:

Name Type Description
fname str

File name to save the image (expected file formats png, bmp, jpg, pdf, etc).

figsize Tuple

Figure size (width, height).

dpi int

Dots per linear inch.

nrows int

Number of axis rows in a figure palete.

ncols int

Number of axis colums in a figure palete.

prob_lower_lim float

Minimum limit of the color bar.

Returns:

Type Description
None

Method returns None.

create_synoptic_output_stack(fname=None, figsize=None, dpi=None, nrows=None, ncols=None)

Method to create stack plots showing different binary CH regional plots identified by CHIPS.

Attributes:

Name Type Description
fname str

File name to save the image (expected file formats png, bmp, jpg, pdf, etc).

figsize Tuple

Figure size (width, height).

dpi int

Dots per linear inch.

nrows int

Number of axis rows in a figure palete.

ncols int

Number of axis colums in a figure palete.

Returns:

Type Description
None

Method returns None.