Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If wlhigh is larger than the highest wavelength of the TLI file, readlineinfo.c overscans and reads in garbage #111

Open
AndrewSDFoster opened this issue Aug 13, 2015 · 4 comments

Comments

@AndrewSDFoster
Copy link
Contributor

To reproduce:

  1. Run demo with wlhigh = 5.0 instead of 4.0.
  2. Add print statement to code that prints out isoid array
  3. get garbage.

The issue appears to be caused by datafileBS() trying to find an index for ilast, but putting it beyond the end of the list of isoids in the file.

I am looking into this bug now, as it appears to be causing a cascade of other problems in my multiple TLI code.

@pcubillos
Copy link
Member

your branch is really outdated with respect to the master. I remember I dealt with pyline boundaries. You should bring your code up to date with the master.

@AndrewSDFoster
Copy link
Contributor Author

I cloned the repository today when I tested this.

On Thu, Aug 13, 2015 at 3:53 PM, Patricio Cubillos <[email protected]

wrote:

your branch is really outdated with respect to the master. I remember I
dealt with pyline boundaries. You should bring your code up to date with
the master.


Reply to this email directly or view it on GitHub
#111 (comment).

@AndrewSDFoster
Copy link
Contributor Author

  1. I cloned the most recent version of master.

  2. I added the following lines after the fclose(fp); on line 587 of readlineinfo.c:
    for (int k=0; k<li->n_l+nread; k++)

    if (lt->isoid[k] > 10 || lt->isoid[k] < 0)

printf("uh oh, isoid of %d\n", lt->isoid[k]);
(I'm giving up on trying to get github to display the whitespace correctly)

\3. I compiled everything and set up the demo run
\4. I changed wlhigh to 5.0
\5. I ran the code and saw garbage

As I said, this appears to be stemming from a bug in datafileBS. I am looking into it, but if you have any ideas or already know what could be causing this issue, help and information are always welcome.

@pcubillos
Copy link
Member

ahhh, I remember I dealt with the BS in pylineread. This is an issue with the BS in Transit...
Keep poking at it, it shouldn't be hard to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants