Repository navigation
Conversation
This tutorial is designed to assess the multiplicity status of a star and calculate a "final" radial velocity for stars when there are several (> 2) individual measurements. Principally the program: 1) reads in a table of RV measurements for any set of stars 2) makes a decision on whether the star is multiple or likely single 3) calculates a final RV from the individual measurements.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
for more information, see https://pre-commit.ci
|
Thanks for contributing! This looks interesting, but I think you might want to see if the indexing logic can be simplified a bit. At least I don't understand it - but maybe that's just because I don't know that much about the topic. |
on measuring radial velocities. The major modifications are that we now use numpy matrices rather than itertools which is easier to read and runs faster than the previous method.
for more information, see https://pre-commit.ci
|
This looks really promising! Thanks so much for the contribution and we'll work on giving it a robust review ASAP. I'm also going to start a thread in the #learn channel on slack. |
|
Hello @alexbinks! I realise it has now been a number of years since you submitted this and that you have probably moved on to new projects. However, I think this is a useful notebook and would like to see it added to Learn. To that end I am happy to do the editing to make it conform to our coding standards. I just have two questions about the code itself, and need you to say that you are happy for me to do this (I will link you to the notebook before it goes live so that you get a chance to verify it before we make it public). My questions are:
I apologise for how long we've let this sit. Let me know what you think of my proposed plan of action. Thank you for your contribution! |
|
I'll have a look, I'm one of the co-authors after all. I won't get to that until next week though. |
|
As I said in #550 (comment) I thin the indexing loci can maybe a bit simplified, or be explained better, but to answer @ceb8 direct question: However, that (a) is hard to understand even for me and (b) it includes a real bug if there is more than one measurement that should be removed @alexbinks: See example below! It probably doesn't happen often in real data, but you should check! I'll change the code of the notebook soon to fix that you you'll have to check your own science applications for this case! |
|
Example for bug: trv = np.array([10.0, 10.1, 10.2, 10.3, 1000, 1000])
erv = np.array([1.,1.,1.,1., 1., 1.])
c = trv[:, None] - trv[None, :]
ee = c > d_max
x = np.array(np.where(ee))[0]which then leads to np.where(ee)
(array([4, 4, 4, 4, 5, 5, 5, 5]), array([0, 1, 2, 3, 0, 1, 2, 3]))The code should really remove datapoint 4 and datapoint 5, but The easiest would be to use |
|
I made a PR to @alexbinks fork in alexbinks#1 |
This tutorial is designed to assess the multiplicity status of a
star and calculate a "final" radial velocity for stars when there
are several (> 2) individual measurements. Whilst intended for
RV measurements, the method can be applied for any
parameter that needs to be weighted from different sources.
Principally the program: