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

China mode breaks #22

Open
ramandi opened this issue Mar 13, 2017 · 2 comments
Open

China mode breaks #22

ramandi opened this issue Mar 13, 2017 · 2 comments
Assignees
Labels

Comments

@ramandi
Copy link

ramandi commented Mar 13, 2017

Probably you are aware, but just in case... china_mode breaks after a while because slatlong and cnlatlong have different lengths.

Thank you for your work!

@hrbrmstr
Copy link
Owner

thx. prbly overhauling this to use WebGL this year.

@hrbrmstr hrbrmstr self-assigned this Mar 13, 2017
@hrbrmstr hrbrmstr added the bug label Mar 13, 2017
@ramandi
Copy link
Author

ramandi commented Mar 13, 2017

Sorry, I'm not sure whether I explained it clearly before.
The problem I saw was simply because the arrays slatlong and cnlatlong, created from csv files, have different sizes.
You get a random src between 0 and slatlong length. Later, if china_mode is enabled, you try to access src index in cnlatlong.
Since samplatlong.csv has 2530 lines, while cnlatlong.csv only has 2519 lines, when src becomes greater than 2519 the indexation fails and the visualization hangs.
Obviously, you can avoid the problem simply making cnlatlong.csv's length greater than samplatlong.csv's one. Despite that, maybe src should be randomly obtained between 0 and cnlatlong's length when china_mode is enabled.
Not a big problem, but I thought I should note it.
If it was clear before, sorry for insisting.

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

No branches or pull requests

2 participants