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

Calculate spatial correlation using TurbuStat for optical sattelite data #243

Open
mohseniaref opened this issue Dec 19, 2022 · 0 comments

Comments

@mohseniaref
Copy link

mohseniaref commented Dec 19, 2022

I would like to estimate spatial correlation for my data which you can assume is numpy array and pixel size is around 30 meter or 0.000277778 degree on ground(earth) . I attempted the following example and it worked for me! I was wondering if I can work with any data using the following command and create a header which can not influence my result

rnoise_img = make_extended(256, powerlaw=3.)
plt.imshow(rnoise_img)
rnoise_hdu = fits.PrimaryHDU(rnoise_img)
pspec.run(verbose=True,fit_2D=False)

Second, After creating example of numpy array which has pixel size around 30 meter, I estimated 1Dslope or 2D slope. I was wondering if there is technique to remove spatial correlated noise using PSD?

from turbustat.simulator import make_extended

from turbustat.statistics import PowerSpectrum

from astropy.io import fits

import warnings

import numpy as np

import matplotlib.pyplot as plt

import astropy.units as u

import matplotlib

moment0 = fits.open("/home/mohammad/Project/SpatialCorrelation/TurbuStat v1.0 tutorial data/Design4_flatrho_0021_00_radmc_moment0.fits")[0]

pspec = PowerSpectrum(moment0, distance=250 * u.pc)

pspec.run(verbose=True, xunit=u.pix**-1)

params=pspec.fit.params
print(pspec.slope2D, pspec.slope2D_err)

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

1 participant