-
Notifications
You must be signed in to change notification settings - Fork 5
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
Produce all required quantities for vectorized source measurements #87
Produce all required quantities for vectorized source measurements #87
Commits on Oct 14, 2024
-
Because of Numba limitations, one cannot raise a ValueError, which wo…
…uld be preferred, here. The message is needed to indicate the nature of the error.
Configuration menu - View commit details
-
Copy full SHA for eddcc25 - Browse repository at this point
Copy the full SHA eddcc25View commit details -
Configuration menu - View commit details
-
Copy full SHA for cdde415 - Browse repository at this point
Copy the full SHA cdde415View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c76e3c - Browse repository at this point
Copy the full SHA 9c76e3cView commit details
Commits on Oct 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fe88cbb - Browse repository at this point
Copy the full SHA fe88cbbView commit details
Commits on Oct 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2b3429f - Browse repository at this point
Copy the full SHA 2b3429fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fb75ea - Browse repository at this point
Copy the full SHA 8fb75eaView commit details -
This is some reformatting happening accidentally after trying to add the computation of the signal-to-noise ratios to this function. It was removed since it seems more efficient to add this computation to the 'insert_island_data' function.
Configuration menu - View commit details
-
Copy full SHA for 5d1c276 - Browse repository at this point
Copy the full SHA 5d1c276View commit details
Commits on Oct 18, 2024
-
Calculate signal-to-noise ratios of detections
This is for VECTORIZED=True. This was still missing from the vectorized part of PySE. It seemed easiest to add this to 'insert_island_data', but requires the noise map as an extra input argument. The dummy array can now actually be used when implemented as float32 instead of int32. The significance (sig) of the detection is defined as the maximum signal-to-noise ratio of the spectral brightness to the local noise, i.e. the local standard deviation of the background pixel values, across all island pixels. Added some clarification here and there.
Configuration menu - View commit details
-
Copy full SHA for a48f73f - Browse repository at this point
Copy the full SHA a48f73fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d896e9a - Browse repository at this point
Copy the full SHA d896e9aView commit details
Commits on Oct 19, 2024
-
First step in computing chisq and reduced_chisq vectorized
After some considerations it turns out that chisq and reduced_chisq are best calculated in 'fitting.moments_enhanced'. That, however, also requires the availability of 'noise_islands', i.e. the rms noise values at the positions of the sources, i.e. at the positions of the pixels comprising 'island_data', in that function. In turn that meant that we need some array with rms noise values similar to 'islands', which contains spectral brightnesses at the positions of the source. To fill 'noise_islands', 'insert_island_data' was expanded and the calculation of the significance of the detection was removed, since this is also best calculated in 'fitting.moments_enhanced'. In affectuating this change, it turns out that 'islands', 'island_data' and 'insert_island_data' are no longer accurate terms since an island can be an island of spectral brightnesses of a source or an island of rms noise values. Hence, the changes in variable and function names. The actual computations of sig, chisq and reduced_chisq will have to covered in upcoming commits. The current commit also includes some corrections and clarifications in comments. Some arrays were initialized later, i.e. closer to the function call. The 'noises' array has the same shape as the 'sources' array, which was formerly called the 'islands' array.
Configuration menu - View commit details
-
Copy full SHA for 7ba044a - Browse repository at this point
Copy the full SHA 7ba044aView commit details -
'sig' is no longer an array to be filled
'sig' should not be filled with values through 'insert_sources_and_noise', i.e. should no longer be an input argument of that function. It has to be filled in 'fitting.moments_enhanced' in an upcoming commit.
Configuration menu - View commit details
-
Copy full SHA for 02dca2c - Browse repository at this point
Copy the full SHA 02dca2cView commit details -
Remove 'sig' also from signature.
In a previous commit, it was only removed from the arguments.
Configuration menu - View commit details
-
Copy full SHA for f7d69e5 - Browse repository at this point
Copy the full SHA f7d69e5View commit details -
'fitting.moments_enhanced' computes significances
of each source detection. This was formerly computed in 'insert_island_data' for the vectorized part of PySE.
Configuration menu - View commit details
-
Copy full SHA for 2b8bc04 - Browse repository at this point
Copy the full SHA 2b8bc04View commit details
Commits on Oct 22, 2024
-
Reformatting to 80 characters per line
for 'moments'. The 'moments_enhanced' docstring was taking too many lines, so also reformatted to fill out more blank space.
Configuration menu - View commit details
-
Copy full SHA for 84cd03b - Browse repository at this point
Copy the full SHA 84cd03bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a9980c8 - Browse repository at this point
Copy the full SHA a9980c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a066bc - Browse repository at this point
Copy the full SHA 7a066bcView commit details -
'indep_pixels' is to be called from guvectorized
code, therefore it needs a njit decorator from Numba. Also, allow for two blank lines before a function.
Configuration menu - View commit details
-
Copy full SHA for df7ebee - Browse repository at this point
Copy the full SHA df7ebeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a7d120 - Browse repository at this point
Copy the full SHA 1a7d120View commit details -
Calc. chisq + reduced_chisq in 'moments_enhanced'
Equivalent to the code in 'goodness_of_fit'. Needed 'indep_pixels' to be njitted. Also, replace numpy. by np. because it's shorter.
Configuration menu - View commit details
-
Copy full SHA for 4d334b6 - Browse repository at this point
Copy the full SHA 4d334b6View commit details -
Indendation corrections from numpy. --> np.
and comment within 80 characters per line.
Configuration menu - View commit details
-
Copy full SHA for fed0b07 - Browse repository at this point
Copy the full SHA fed0b07View commit details -
chisq and reduced_chisq to be filled with
the corresponding statistics for each detection. Both arrays are 1D single precision floats.
Configuration menu - View commit details
-
Copy full SHA for 15d1aae - Browse repository at this point
Copy the full SHA 15d1aaeView commit details
Commits on Oct 24, 2024
-
1.05 was apparently not chosen, cannot remember
why. And preparing for the Gaussian_islands and Gaussian_residuals arrays to be filled. This is just initialisation.
Configuration menu - View commit details
-
Copy full SHA for e43be70 - Browse repository at this point
Copy the full SHA e43be70View commit details
Commits on Oct 28, 2024
-
The 'data' attribute should not be used.
Instead, use of MaskedArray will ensure that masks will be propagated.
Configuration menu - View commit details
-
Copy full SHA for 3a7919a - Browse repository at this point
Copy the full SHA 3a7919aView commit details -
'self.data_bgsubbed' became numpy.float64
although we started off with 'self.rawdata = numpy.ascontiguousarray(data, dtype=numpy.float32)'. However, the function 'data_bgsubbed(self)' returns 'self.data - self.backmap' and the latter is numpy.float64 since we had 'my_map = numpy.ma.MaskedArray(numpy.zeros(self.data.shape), mask=self.data.mask)' which creates a numpy.float64 array. Also, 'mode_and_rms = useful_data.map_blocks(..,..,dtype=numpy.complex64,..)' oddly enough returns numpy.complex128! For that reason 'mode_grid' and 'rms_grid' were converted to four byte floats.
Configuration menu - View commit details
-
Copy full SHA for 1af20ab - Browse repository at this point
Copy the full SHA 1af20abView commit details -
The map of Gaussian reconstructions and residuals
is now computed within 'fitting.moments_enhanced'. After reconsideration, this function turned out to be the best candidate to compute those arrays. It did require adding two array arguments to this function, i.e. the zeroed 'Gaussian_islands' and 'Gaussian_residuals' arrays. These arrays can later be saved as maps (FITS files).
Configuration menu - View commit details
-
Copy full SHA for 043673a - Browse repository at this point
Copy the full SHA 043673aView commit details -
No longer return 'x_positions' and 'y_positions'
since they will not be used. Instead, return 'Gaussian_islands' and 'Gaussian_residuals'. 'image.py' has been adapted such that 'data_bgsubbeddata' will always be a np.float32 array, i.e. not np.float64. 'extract.calculate_Gaussian_islands' is no longer needed.
Configuration menu - View commit details
-
Copy full SHA for a0a86dc - Browse repository at this point
Copy the full SHA a0a86dcView commit details -
'source_measurements_pixels_and_celestial_vectorised', since we are returning five more arrays.
Configuration menu - View commit details
-
Copy full SHA for 6b23f2c - Browse repository at this point
Copy the full SHA 6b23f2cView commit details
Commits on Oct 29, 2024
-
Ensure that ImageData.data_bgsubbed is np.float32
and 'VECTORIZED = False' is required to pass all unit tests - the two that are not passed will be fixed later. 'Gaussian_islands', 'Gaussian_residuals', 'sig', 'chisq' and reduced_chisq are now returned. Calling 'extract.calculate_Gaussian_islands' is no longer needed and this function has been removed in a previous commit.
Configuration menu - View commit details
-
Copy full SHA for 7655151 - Browse repository at this point
Copy the full SHA 7655151View commit details -
Clarify the use of Gaussian_islands_map and
Gaussian_residuals_map.
Configuration menu - View commit details
-
Copy full SHA for 66afb02 - Browse repository at this point
Copy the full SHA 66afb02View commit details -
Replace 'numpy.' by 'np.' for reasons of brevity
and an extended docstring.
Configuration menu - View commit details
-
Copy full SHA for aef50af - Browse repository at this point
Copy the full SHA aef50afView commit details -
Again, replace "numpy." by "np.", for reasons of
brevity. This also affected indentation for multiline commands here and there, indentation adapted.
Configuration menu - View commit details
-
Copy full SHA for fc951bd - Browse repository at this point
Copy the full SHA fc951bdView commit details