CHIPS Tools (Disk Map)
chips.chips.Chips
Bases: object
An object class that runs the CHIPS algorithm step-by-step with a set of input parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
aia |
chips.fetch.RegisterAIA
|
AIA/Map object that holds all the information on |
base_folder |
str
|
Base folder to store the processed figures and datasets. |
medfilt_kernel |
int
|
Median filtering Gaussian kernel size (odd number). |
h_bins |
int
|
Number of bins in histogram while running Otsu's method. |
h_thresh |
float
|
Otsu's thresold (computed inside if not given, \(I_{th}\)). |
ht_peak_ratio |
int
|
Needed to cpmpute threhold while computing Otsu's method. |
hist_xsplit |
int
|
Needed to compute thresholds by splitted image (number of splitted along the image width). |
hist_ysplit |
int
|
Needed to compute thresholds by splitted image (number of splitted along the image height). |
threshold_range |
List[float]
|
List of thresholds from |
porb_threshold |
int
|
This is \(x_{\tau}\). |
area_threshold |
float
|
Percentage (0-1) area thresholds to remove small structures. |
run_fl_cleanup |
bool
|
Run the filament cleanups. |
get_base_folder()
Method to find local base folder to store figures and outputs.
Returns:
| Type | Description |
|---|---|
None
|
Method returns None. |
run_CHIPS(wavelength=None, resolution=None, clear_prev_runs=False)
This method selects the chips.fetch.SolarDisk(s) objects and runs the CHIPS algorithm sequentially.
Attributes:
| Name | Type | Description |
|---|---|---|
wavelength |
int
|
Wave length of the disk image [171/193/211]. |
resolution |
int
|
Resolution of the image to work on [4096]. |
clear_prev_runs |
bool
|
Clearing the outputs from previou run. |
Returns:
| Type | Description |
|---|---|
None
|
Method returns None. |
process_CHIPS(disk, clear_prev_runs)
This method runs the CHIPS algorithm for a selected chips.fetch.SolarDisk object.
Attributes:
| Name | Type | Description |
|---|---|---|
disk |
chips.fetch.SolarDisk
|
Solar disk to run CHIPS algorithm. |
clear_prev_runs |
bool
|
Clearing the outputs from previou run. |
Returns:
| Type | Description |
|---|---|
None
|
Method returns None. |
extract_solar_masks(disk)
run_filters(disk)
extract_histogram(disk)
extract_histograms(disk)
Method extracting Otsu's thresolds by splitting solar disk into different windows (windows are estimated using xsplit, ysplit).
Attributes:
| Name | Type | Description |
|---|---|---|
disk |
chips.fetch.SolarDisk
|
Solar disk information for each wavelenght bands. |
Returns:
| Type | Description |
|---|---|
None
|
Method returns None. |
extract_sliding_histograms(disk)
Method extracting Otsu's thresolds by sliding a window (size determined by xsplit, ysplit) through the solar disk.
Attributes:
| Name | Type | Description |
|---|---|---|
disk |
chips.fetch.SolarDisk
|
Solar disk information for each wavelenght bands. |
Returns:
| Type | Description |
|---|---|
None
|
Method returns None. |
extract_CHs_CHBs(disk)
calculate_prob(data, thresholds)
Method to estimate probability for each CH region identified by CHIPS.
Attributes:
| Name | Type | Description |
|---|---|---|
data |
np.array
|
Numpy 1D array holding '.fits' level intensity (I) dataset. |
thresholds |
List[float]
|
Intensity thresolds (\(I_{th}\)). |
Returns:
| Name | Type | Description |
|---|---|---|
p |
float
|
Probability [\(\theta\)] of each region estimated using Beta function. |
plot_diagonestics(disk, dpi=240, prob_lower_lim=0.0, vert=None)
Method to create diagonestics plots showing different steps of CHIPS. Expected file formats png, bmp, jpg, pdf, etc.
Attributes:
| Name | Type | Description |
|---|---|---|
disk |
chips.fetch.SolarDisk
|
Solar disk object that holds all information for drawing. |
dpi |
int
|
Dots per linear inch. |
prob_lower_lim |
float
|
Minimum limit of the color bar. |
vert |
np.array
|
Vertices of rectange to zoom in a specific region [lower left, upper right points]. |
Returns:
| Type | Description |
|---|---|
None
|
Method returns None. |
clear_run_results(disk)
This method clears the model outputs.
Returns:
| Type | Description |
|---|---|
Method returns None. |
to_netcdf(wavelength, resolution, file_name=None)
Method to save the CHIPS object to netCDF files. Expected file formats netCDF.
Attributes:
| Name | Type | Description |
|---|---|---|
wavelength |
int
|
Wave length of the disk image [171/193/211]. |
resolution |
int
|
Resolution of the image to work on [4096]. |
file_name |
str
|
Name of the file (.nc). |
Returns:
| Type | Description |
|---|---|
None
|
Method returns None. |
compute_similarity_measures(map, map0, measure='Hu')
This method compute similarity matrices (cosine, Hu)
Attributes:
| Name | Type | Description |
|---|---|---|
map |
np.ndarray
|
An nD(typically 2D) array containing the map for comparison. |
map0 |
np.ndarray
|
Baseline solar map to compare againts. |
measure |
str
|
Similarity measure name [cos/Hu] |
Returns:
| Type | Description |
|---|---|
Dict
|
Method returns dictionary of measures. |