Thomaslund1 / SpecCorrect

3 stars 0 forks source link

getVel doesn't calculate velocities? #15

Closed rterrien closed 2 months ago

rterrien commented 2 months ago

Is this function mis-named? It looks like it needs a velocity array input to begin with, and just bins/averages that. It doesn't calculate the velocities (and so doesn't seem to use the ref keyword either). I found this because I tried to use this to make a velocity plot with a different reference point and it didn't change anything. Does this function need to take wavelength inputs and then call the wl2vel function?

https://github.com/Thomaslund1/SpecCorrect/blob/e2b701e1cc15b8927e2a3b3c3c6106c958a19b86/lib.py#L810C5-L810C12

Fos314 commented 2 months ago

The way it has been used by us so far is basically to bin the velocities that are generated by wl2vel. We could either implement wl2vel to the function or change the name to binVel. I would probably prefer keeping the the functions separate, but if we wanted to keep the getVels functions we could make it use wl2vel and bin in one step. Any preferences?

Fos314 commented 2 months ago

I changed the function from getVels to binVels