-
Notifications
You must be signed in to change notification settings - Fork 17
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
Notebook about stack measurements of size & centroid on pixelized images #210
Conversation
… scale, illustrating a bias in the calculation of moments on pixelized images
…ent. Fixed the legend in the last figure.
Thanks for the great suggestions Alex. Removing the source extractor was a good idea. I removed the corrected first moment definition, and added another wider Gaussian weight to the centroid measurement to illustrate the issue. Is this ready to merge to master? @kadrlica |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, looks good. I'll approve and merge.
" else:\n", | ||
" self.sensor = None\n", | ||
" \n", | ||
" def draw_gaussian(self,offset=(0.0,0.0),gal_sigma_pix=1.5,gal_ellip=0,\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't gone far enough to know if/why this makes sense, but I think it would be conceptually clearer to separate the hsm fitting from the Gaussian image generation (also, doesn't seem like the hsm fit belongs in a function called draw_gaussian
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh I forgot this too in the PCW chaos! That would be a good addition
"outputs": [], | ||
"source": [ | ||
"def calc_firstmoms(img,coord,winsize,thresh,gwin_sig):\n", | ||
" #print(img[:5,:5],coord,winsize,thresh,gwin_sig)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that you don't mean for this comment string to be here.
"toc-hr-collapsed": true | ||
}, | ||
"source": [ | ||
"## Functions to make images" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be very useful to have some context here. Something along the lines of "Here we define some functions to use GalSim to generate images of detectors. Various levels of realism (sensor features, sky background, noise, etc.) are configurable. We also provide functionality to generate a Gaussian source..."
"outputs": [], | ||
"source": [ | ||
"# Import sep, uncomment the line below if you haven't got it installed yet\n", | ||
"# !pip install sep --user\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that I like this. Having python modules floating around in the users PYTHONPATH will not play nicely with conda environments (and will probably come back to bite us once we've forgotten). Unfortunately, I'm not sure I have a better solution. Is the SExtractor comparison integral to the notebook?
This notebook simulates and measures objects near the pixel scale, illustrating a bias in the calculation of moments on pixelized images. A corrective algorithm modification is proposed. This addresses the very core of issue #123 . Looking for a reviewer!