Comments (2)
I've pushed a commit to the xd_support
branch which should fix this issue. It should be possible to cherry-pick to other branches without problems. The underlying issue is that the code wasn't written for, and doesn't expect, negative portions of the profile. An aperture's width is determined as a fraction of the distance between its peak and the nearest minimum. This change makes it so that maxima/minima below the median are merged/set to the median of the data before determining aperture limits, since they would otherwise overwhelm the natural minima found in the continuum. In testing this causes the aperture limits to be set much more reasonably as the nearest minima are simply down in the continuum near the peak.
from dragons.
findApertures()
has a parameter threshold
, with the description "Threshold for automatic width determination" with a default value of 0.1. It sets the edges of the apertures as a function of the distance between the peak and the nearest adjacent minimum; with such high SNR those minima are likely in the troughs, as insignificant maxima/minima are culled. Increasing threshold
decreases the width of the aperture found (a value of 0.5 is the FWHM according to a comment), and 0.1 is fairly conservative, at least for GNIRS data. Increasing it to 0.25, for instance, gives the following aperture (zoomed to the inner region to show detail):
The value of threshold
may need some fine-tuning though, depending on the data; for example a value of 0.2 gives the following asymmetric aperture:
More testing would be needed, but it may be useful to have different default values of threshold
depending on the instrument and/or observing mode. (I'd be surprised if there was a "one size fits all" value.)
A related bug which have some bearing on this is that currently in master
handling of adjacent minima when culling them from the list of extrema returned culls the wrong one. I don't think this is likely a big problem in most cases, but the bug is fixed in commit 1e446aed11763affdeae0711220d707e80255aa8 in xd_support
. It's a simple one-line fix, and when reducing this data with that fix temporarily copied in master
the second, spurious aperture present with threshold=0.1
is not found.
from dragons.
Related Issues (20)
- missing ad.close() or equivalent HOT 1
- caldb config claims that remote DB are configured when they are not
- Need to lower memory requirements in `distortionCorrect`
- Fix duplicate warnings correctly
- Spaces not supported in caldb database paths HOT 1
- Multiprocessing issues with "differential evolution"?
- Improve robustness of reduction by checking compatibility of all inputs
- ad[0].multiply(1.) fails with astropy 5.3 HOT 4
- Logic for when to write output files needs improving
- Incomplete provenance in output of NIRI's makeProcessedBPM recipe
- caldb add does not warn when trying to add an unsupported file
- flatCorrect() [and other primitives?] do some checks on user-supplied calibrations
- Expose threshold for flagging resampled bad pixels HOT 2
- QECorrect Primitive not working on Longslit E2V data v 3.1 HOT 1
- Strange crash in determineAstrometricSolution - negative dimension HOT 1
- Improve tracing algorithm
- Crash on skyCorrectFromSlit when using small regions HOT 1
- Convert wavelength units when opening a file (or check units in DRAGONS)
- stackFrames primitive sets incorrect filename if phu["ORIGNAME"] does not exists.
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 dragons.