sandialabs / InterSpec

spectral radiation analysis software
https://sandialabs.github.io/InterSpec
GNU Lesser General Public License v2.1
129 stars 21 forks source link

Feature request: sync Y scale between spectrum and gamma cps graphs #26

Closed ckuethe closed 10 months ago

ckuethe commented 11 months ago

As illustrated in the screenshot below, the spectrum is in log scale, but the time series is in linear scale. It'd be nice to have those synced up, or have an another control to switch between linear and log scale on the count rate graph.

Screenshot_2023-12-22_19-59-49

wcjohns commented 10 months ago

This is a good suggestion!

However, I think whether the time chart is log or linear is independent the spectrum being log or linear, so will probably implement as such (probably under the "Opt" tab when you click the three little dots on the upper-right-hand side of the time chart).

It looks like in D3TimeChart.js, if you replace the call to yScaleGamma = ...linear()... with yScaleGamma = ...log().., and then make sure the domain doesn't go to zero, d3.js will take care of the rest. Of course all this needs to be propagated through the plotting options, and a proper domain needs to be found from the (visible) data, but this is all doable. I'll try to get to this before the next release.

Thanks for the suggestion Chris! -will

wcjohns commented 10 months ago

Log-y option added to the time chart in commit 40e8f78. Only applies to gammas, since its maybe not super useful for neutrons.

ckuethe commented 10 months ago

Works for me.

Screenshot_2024-01-04_22-28-58