[PIPE2D-907] Solve profiles for multiple fibers simultaneously Created: 29/Sep/21 Updated: 28/Apr/23 Resolved: 28/Apr/23 |
|
| Status: | Done |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Normal |
| Reporter: | price | Assignee: | price |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Story Points: | 5 |
| Sprint: | 2DDRP-2021 A 10, 2DDRP-2021 A11, 2DDRP-2022 A, 2DDRP-2023 A |
| Description |
|
If black spots are not perfect at hiding fibers and/or allow even a little light, then fiber profiles measured independently will be contaminated. rhl advocates measuring simultaneously in order to remove the contamination. |
| Comments |
| Comment by price [ 12/Oct/21 ] |
|
We're going to assume for starters that the black spots are grey (constant attenuation as a function of wavelength). We can't assume that the attenuation is identical for all fibers. |
| Comment by price [ 14/Oct/21 ] |
|
rhl has suggested that solving for the profiles might be done by matrix inversion. But it seems to me that the model is non-linear in the parameters, as we're fitting:
flux(image, x, y) = A_{image, fiber} . B_{fiber, x, y}
where A is the normalisation for a particular fiber on a particular image, and B is the fiber profile. If we were to fit log(flux) the equation would be linear, but then it's not linear in flux and Bad Things would surely happen. One thing to think about is measuring a guess for A directly from the data (e.g., starting with a narrow boxcar extraction) and solving for B. Then we could iterate a few times in an attempt to atone for errors in our starting assumption. |
| Comment by price [ 02/Feb/22 ] |
|
I've come fairly close to getting this working well, but I've hit a roadblock when fitting profiles in the integration test: the matrix solution is taking a crazy long time with the default solver, and other solvers either fail or segfault. But the matrices are fine when I run them through the Eigen sparse matrix benchmark program. I'm hoping that a more recent version of Eigen will deal with whatever is causing this, so will put this back on the stack until after |
| Comment by rhl [ 02/Feb/22 ] |
|
Hmm. Are you sure that there's not a memory problems somewhere? |
| Comment by price [ 02/Feb/22 ] |
|
Thanks for the idea. I found a memory problem in my code, but fixing that didn't help the segfaults and such in the matrix solver. |
| Comment by rhl [ 02/Feb/22 ] |
|
You shouldn't be able to get segfaults from a bad matrix, especially if it solves stand-alone. |
| Comment by arnaud.lefur [ 28/Mar/23 ] |
|
price Where do we stand on merging this ? |
| Comment by price [ 28/Apr/23 ] |
|
Merged a couple of weeks ago. |