Giter VIP home page Giter VIP logo

Comments (2)

DBerke avatar DBerke commented on July 25, 2024 1

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.

DBerke avatar DBerke commented on July 25, 2024

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):
threshold=0 25_master_zoomed
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:
threshold=0 2_master_zoomed
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.