-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
DOC: avoid iteration for light travel time of lots of objects #7755
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
Comments
For user cases where there are thousands of times for each source, broadcasting can be used: times = Time.now() + np.linspace(0, 3, 1000)*u.day
%time ltts = times.light_travel_time(coos[:, np.newaxis], location=observatory)
CPU times: user 13.8 s, sys: 13 s, total: 26.8 s
Wall time: 27.9 s |
Hi, I am shilpi. I am new to opensource and would like to contribute. |
@shilpi1958 , I don't see why not. http://www.astropy.org/contribute.html |
I think this has already been started in #7893 |
So I can reproduce similar results/effects in comparative performance after fixing some bugs using the following:
and with broadcasting
So on the surface everything seems to be in order. Using iteration definitely aversely affect the performance of the system when invoking |
Hey is this issue still open? I tried to follow the comment thread but I couldnt really tell. Let me know if it open as I would like to work on this! |
@KING-SID - I think @kakirastern and @SG004 are on top of this, see the conversation in their PR. |
Hi @KING-SID, I am still awaiting @SG004's confirmation to see if he still wants to follow up on his previous work and continue until his PR (or a new one, depends) is merged/closed. If he decides he doesn't want to work on it anymore then I will take over with a new PR. So as @bsipocz has stated, we are on top of this. Thanks for your interest, however. |
Hey previous comment thread, is this issue still open? haha I couldn't tell seeing as it's still open and a "good first issue" |
Gotcha, ok thanks! |
In our user survey, @stargaser mentioned they had issues at ZTF when calculating light travel times for tens of thousands of sources in a degree patch of the sky. It might be worth a section in the performance area of the
Time
documentation comparing run times of the following approaches:The text was updated successfully, but these errors were encountered: