PrincetonUniversity / Iseult

Python plotting program for Tristan-MP
https://princetonuniversity.github.io/Iseult/
GNU General Public License v3.0
7 stars 7 forks source link

x bin size in spectra #24

Closed ntoles closed 2 months ago

ntoles commented 2 months ago

I'm not sure if this is a new or existing issue, or an issue at all: when reading the spectra from v2 data that has only one x bin, it assigns the mid-point of that bin to be somewhere near the left wall. It should be somewhere in the middle of the box in x. Maybe this is because that's the coordinate that comes in from the file, but I'm not sure. We have never tried it with 1 bin in x before, so I don't know what v1 normally does on this.

When there are several bins in x, it seems to do something more sensible.

bcaddy commented 2 months ago

Do Tristan v1 and Tristan v2 bin the spectra differently?

bcaddy commented 2 months ago

I'm not sure what you mean, could you post a screenshot with what you see and what is wrong with it?

ntoles commented 2 months ago

if x-range is set from 0, then it shows the spectrum

image

if range is set from 60, the spectrum is gone. I think this is because there is one bin and it thinks that the spectrum is located at the left edge of the bin. We didn't have this problem in v1 as there were always many bins. Here, it would make sense to position the spectrum in the middle of the x-bin.

image
bcaddy commented 2 months ago

Looking at the data in 1_test in Adam's directory it does appear to work just fine as long as there is more than one bin in space. Given that having more than one bin is the intended use case can I close this issue?

bcaddy commented 2 months ago

I'm marking this as complete since Iseult works for the intended use case and I haven't gotten an indication to keep it open.