Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magnetic cutoff filtering #30

Open
imogenagle opened this issue Jul 18, 2024 · 2 comments
Open

Magnetic cutoff filtering #30

imogenagle opened this issue Jul 18, 2024 · 2 comments

Comments

@imogenagle
Copy link

Figure out why the hmi data is filtered the way it is.

@samaloney
Copy link
Member

Can you link to the code here?

@imogenagle
Copy link
Author

imogenagle commented Jul 29, 2024

pos = np.zeros((len(poslin[0]), 2), dtype=np.uint)
pos[:, 0] = np.array((poslin[0] - (s[0] / 2)) * convermul + (s[1] / 2), dtype=np.uint)
pos[:, 1] = np.array((poslin[1] - (s[0] / 2)) * convermul + (s[1] / 2), dtype=np.uint)
npix = list(
np.histogram(
datm[pos[:, 0], pos[:, 1]],
bins=np.arange(
np.round(np.min(datm[pos[:, 0], pos[:, 1]])) - 0.5,
np.round(np.max(datm[pos[:, 0], pos[:, 1]])) + 0.6,
1,
),
)
)
npix[0][np.where(npix[0] == 0)] = 1
npix[1] = npix[1][:-1] + 0.5
wh1 = np.where(npix[1] > 0)
wh2 = np.where(npix[1] < 0)
# =====magnetic cut offs dependent on area=========
if (
np.absolute((np.sum(npix[0][wh1]) - np.sum(npix[0][wh2])) / np.sqrt(np.sum(npix[0])))
<= 10
and arcar < 9000
):
continue
if (
np.absolute(np.mean(datm[pos[:, 0], pos[:, 1]])) < garr[int(cent[0]), int(cent[1])]
and arcar < 40000
):
continue
iarr[poslin] = ident

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants