Conversation
|
While I understand the justification here, and the unit testing looks good, I would expect to see something like a notebook showing that we get similar star selection with this PR for cold temperatures and for hot temperatures there are, in aggregate, changes to acq catalogs, and then a walk-through showing that at least one acquisition catalog has a more sane rejection or selection around an imposter region. Do you want me to go and do that? |
|
It is a bit out of scope, but it looks to me like get_imposter_stars sets box_size as a 120 default, but then assumes it is an ACABox (when used as |
| dc_labeled, n_hits = ndimage.label(dc2x2 > thresh) | ||
| if ACQ.search_hit_max_size is not None: | ||
| dc_labeled, n_hits = split_labeled_regions( | ||
| dc_labeled, max_size=ACQ.search_hit_max_size |
There was a problem hiding this comment.
This is throwing "ValueError: zero-size array to reduction operation maximum which has no identity" on my first toy test at slices = ndimage.find_objects(dc_labeled), so unless you want to handle the empty case in split_labeled_regions, I think the "if n_hits == 0: return" code should probably come before split_labeled_regions.
There was a problem hiding this comment.
Can you provide a reproducible example? I tried the following and it worked as expected.
import proseco.acq as pracq
dc_labeled = np.array([[0, 0], [0, 0]])
pracq.split_labeled_regions(dc_labeled)
I agree that the if n_hits == 0: check could be moved up for efficiency.
There was a problem hiding this comment.
It looks like my original issue was that I both wasn't sure about the domain of "star_row" and "star_col" and I'm a bit flummoxed about why "test" changes the offset by 512 pixels. It looks like now I'm only hitting ValueError if I'm out of bounds.
dark = mica.archive.aca_dark.get_dark_cal_image("2025:001", t_ccd_ref=-10)
dat = Table(get_imposter_stars(dark=dark, star_row=200, star_col=2000, box_size=(1000,1000)))
There was a problem hiding this comment.
I haven't yet checked legitimate edge cases.
Fixed. |
Description
This fixes an issue where
get_imposter_starscould miss imposters at a warm temperature and faint mag.This PR adds a new function to split search hit regions into boxes no larger than 8x8. This simple strategy is not perfect, but it is much better than the current situation in which one mega region gets a single imposter with the mag of the 6x6 region at the center. The new code will generate many imposters that effectively block selecting the candidate star in that region.
Interface impacts
Testing
Unit tests
Independent check of unit tests by [REVIEWER NAME]
Functional tests
No functional testing.