Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 18, 2024
1 parent a67d8a8 commit 1f09863
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
1 change: 1 addition & 0 deletions chimerapy/chimera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Package for Coronal Hole Identification Algorithm"""

import glob
import sys

Expand Down
17 changes: 9 additions & 8 deletions chimerapy/chimera_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sunpy.map
from astropy import wcs
from astropy.modeling.models import Gaussian2D
from astropy.visualization import astropy_mpl_style
from skimage.util import img_as_ubyte
from sunpy.coordinates import (HeliographicStonyhurst,
propagate_with_solar_surface)
Expand Down Expand Up @@ -84,10 +83,11 @@ def filter(map1: np.array, map2: np.array, map3: np.array):

im171, im193, im211 = filter(im171, im193, im211)


def shape(map1: sunpy.map.Map, map2: sunpy.map.Map, map3: sunpy.map.Map):
"""
defines the shape of the arrays as "s" and "rs" as the solar radius
Parameters
----------
map1: 'sunpy.map.Map'
Expand All @@ -99,9 +99,9 @@ def shape(map1: sunpy.map.Map, map2: sunpy.map.Map, map3: sunpy.map.Map):
s: 'tuple'
rs: 'astropy.units.quantity.Quantity'
rs_pixels: 'astropy.units.quantity.Quantity'
"""

im171, im193, im211 = filter(map1, map2, map3)
# defines the shape of the arrays as "s" and "rs" as the solar radius
s = np.shape(im171.data)
Expand All @@ -110,6 +110,7 @@ def shape(map1: sunpy.map.Map, map2: sunpy.map.Map, map3: sunpy.map.Map):
rs_pixels = im171.rsun_obs / im171.scale[0]
return s, rs, rs_pixels


s, rs, rs_pixels = shape(im171, im193, im211)


Expand All @@ -126,7 +127,7 @@ def pix_arc(amap: sunpy.map.Map):
"""
dattoarc = amap.scale[0].value
s = amap.dimensions
conver = (s.x/2) * amap.scale[0].value / amap.meta['cdelt1'], (s.y / 2)
conver = (s.x / 2) * amap.scale[0].value / amap.meta["cdelt1"], (s.y / 2)
convermul = dattoarc / amap.meta["cdelt1"]
return dattoarc, conver, convermul

Expand Down Expand Up @@ -174,7 +175,7 @@ def to_helio(amap: sunpy.map.Map):
center = [int(s[1] / 2.0), int(s[1] / 2.0)]
w = np.where((xgrid - center[0]) ** 2 + (ygrid - center[1]) ** 2 > r**2)
y, x = np.mgrid[0:1024, 0:1024]
width = (2000 * u.arcsec)
width = 2000 * u.arcsec
garr = Gaussian2D(
1,
im171.reference_pixel.x.to_value(u.pix),
Expand Down Expand Up @@ -949,9 +950,9 @@ def plot_mask(slate=slate):
INPUT_FILES["aia171"], INPUT_FILES["aia193"], INPUT_FILES["aia211"], INPUT_FILES["hmi_mag"]
)

'''
"""
Document detailing process summary and all functions/variables:
https://docs.google.com/document/d/1V5LkZq_AAHdTrGsnCl2hoYhm_fvyjfuzODiEHbt4ebo/edit?usp=sharing
'''
"""
5 changes: 1 addition & 4 deletions chimerapy/chimera_legacy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
"""
"""

""" """

import glob
import sys
Expand Down

0 comments on commit 1f09863

Please sign in to comment.