plotastrodata 1.7.1__tar.gz → 1.7.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/PKG-INFO +1 -1
  2. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/__init__.py +1 -1
  3. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/analysis_utils.py +16 -2
  4. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata.egg-info/PKG-INFO +1 -1
  5. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/LICENSE +0 -0
  6. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/README.md +0 -0
  7. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/const_utils.py +0 -0
  8. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/coord_utils.py +0 -0
  9. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/ext_utils.py +0 -0
  10. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/fft_utils.py +0 -0
  11. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/fits_utils.py +0 -0
  12. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/fitting_utils.py +0 -0
  13. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/los_utils.py +0 -0
  14. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/matrix_utils.py +0 -0
  15. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/other_utils.py +0 -0
  16. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata/plot_utils.py +0 -0
  17. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata.egg-info/SOURCES.txt +0 -0
  18. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata.egg-info/dependency_links.txt +0 -0
  19. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata.egg-info/not-zip-safe +0 -0
  20. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata.egg-info/requires.txt +0 -0
  21. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/plotastrodata.egg-info/top_level.txt +0 -0
  22. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/setup.cfg +0 -0
  23. {plotastrodata-1.7.1 → plotastrodata-1.7.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.7.1
3
+ Version: 1.7.2
4
4
  Summary: plotastrodata is a tool for astronomers to create figures from FITS files and perform fundamental data analyses with ease.
5
5
  Home-page: https://github.com/yusukeaso-astron/plotastrodata
6
6
  Download-URL: https://github.com/yusukeaso-astron/plotastrodata
@@ -1,4 +1,4 @@
1
1
  import warnings
2
2
 
3
3
  warnings.simplefilter('ignore', FutureWarning)
4
- __version__ = '1.7.1'
4
+ __version__ = '1.7.2'
@@ -1,3 +1,4 @@
1
+ import warnings
1
2
  import numpy as np
2
3
  from dataclasses import dataclass
3
4
  from scipy.interpolate import RegularGridInterpolator as RGI
@@ -291,12 +292,17 @@ class AstroData():
291
292
  pixelperbeam = Omega / np.abs(self.dx * self.dy)
292
293
  else:
293
294
  pixelperbeam = 1.
295
+ s = 'sigma is multiplied by sqrt(pixel-per-beam)' \
296
+ + ' to consider the noise correlation in a beam.' \
297
+ + ' This correction is relatively conservative.'
298
+ warnings.warn(s, UserWarning)
294
299
 
295
300
  def logl(p):
296
301
  rss = np.nansum((model(p, x, y) - d)**2)
297
302
  return -0.5 * rss / self.sigma**2 / pixelperbeam
298
303
 
299
- mcmc = EmceeCorner(bounds=bounds, logl=logl, progressbar=progressbar)
304
+ mcmc = EmceeCorner(bounds=bounds, logl=logl,
305
+ progressbar=progressbar)
300
306
  kwargs_fit0 = {}
301
307
  kwargs_fit0.update(kwargs_fit)
302
308
  mcmc.fit(**kwargs_fit0)
@@ -338,9 +344,17 @@ class AstroData():
338
344
  bounds = [[-amax, xmin, ymin, ds, ds, -90],
339
345
  [amax, xmax, ymax, smax, smax, 90]]
340
346
  x, y = np.meshgrid(x, y)
347
+ Omega = np.pi * self.beam[0] * self.beam[1] / 4 / np.log(2)
348
+ pixelperbeam = Omega / np.abs(self.dx * self.dy)
349
+ s = 'sigma is multiplied by sqrt(pixel-per-beam)' \
350
+ + ' to consider the noise correlation in a beam.' \
351
+ + ' This correction is relatively conservative.'
352
+ warnings.warn(s, UserWarning)
341
353
  popt, pcov = curve_fit(gaussian2d,
342
354
  (x.ravel(), y.ravel()), d.ravel(),
343
- p0=p0, bounds=bounds)
355
+ p0=p0, bounds=bounds,
356
+ sigma=self.sigma * np.sqrt(pixelperbeam),
357
+ absolute_sigma=True)
344
358
  model = gaussian2d((x, y), *popt)
345
359
  residual = d - model
346
360
  if (center := self.center) is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.7.1
3
+ Version: 1.7.2
4
4
  Summary: plotastrodata is a tool for astronomers to create figures from FITS files and perform fundamental data analyses with ease.
5
5
  Home-page: https://github.com/yusukeaso-astron/plotastrodata
6
6
  Download-URL: https://github.com/yusukeaso-astron/plotastrodata
File without changes
File without changes
File without changes
File without changes