Comments (8)
def measure_snr(star):
There is already a function InputFiles.calculateSNR
. And I believe the result is stored in the props
dict of the star. So is this really needed? If so, let's at least move the existing function to util.py and refactor it as needed to make it usable in both contexts.
def estimate_cov_from_jac(jac):
This is part of PR #94.
def calculate_moments(star, third_order=False, fourth_order=False, radial=False, errors=False, logger=None):
This function would be a worthwhile PR on its own, but I think it requires some work.
I worked on this back in August, but had trouble making them really robust. In particular, there are a number of various fudge factors in there, which are not well motivated. And the errors=True
option I think is not particularly accurate.
So if someone can really hammer out a solid set of unit tests for this using a wide array of input galaxy profiles, showing that the code is accurate across a realistic swath of inputs, then I'd be happy to get this merged.
from piff.
from piff.
I did test these with some star shapes - assume you meant stars not galaxies here.
Yes. Sorry. I meant a variety of realistic star profiles. :)
from piff.
So, the InputFiles.calculateSNR() is needed b/c in a couple cases the SNR calculate is being simulated rather than stars being read from input files. Since it is static I can call it from where ever at the cost of an added dependence on piff.input.InputFiles. So, it might make sense to pull it to util.py, but that isn't strictly needed. I can confirm that using the function InputFiles.calculateSNR works fine.
from piff.
Similarly estimate_cov_from_jac works fine. So I think once you decide if we want to move calculateSNR to utils or not we can close this issue and open an new one for the hsm moments.
from piff.
If calculateSNR is used from multiple places, I think it makes sense to put it in util. Feel free to do that now if you like. Especially since it's a staticmethod, so there's not any reason really to have it live in InputFiles.
from piff.
Ok, I made a PR for that. Once that gets approved lets close this issue and make a new one for the calculate_moments and associated tests.
from piff.
Ok, the PR has been merged. I'll discuss with Aaron what me need to include the moments.
from piff.
Related Issues (20)
- Add calculate_moments function to util and associated unit tests. HOT 1
- PSF wings HOT 2
- Reading WCS solution of ZTF images HOT 1
- Stars Center on the stamps HOT 7
- psf.draw | wcs is not a list for single chip fit HOT 5
- Add equality testing HOT 1
- very large PSF (after re-installation) | Bad fit HOT 6
- regularize in a hacky way HOT 3
- Examples in documentation & `examples/` fail for v1.2 HOT 3
- Piff catastrophically fails when PixelGrid size is larger than input star images HOT 3
- Inconsistent piff log message levels HOT 2
- Fix max_snr weight adjustment.
- Make it easy to run just the star selection without fitting a PSF model
- incorrect error message with missing keyword
- coadd_object_id in psf_stars extension is stored as an f8 instead of an i8 HOT 3
- Add optional high order moments to the HSM output file. HOT 4
- Let weight, badpix be different files from image.
- Strange PSF fitting HOT 5
- Request: Release new version
- test suite needs pytest<8 and galsim<2.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from piff.