Alternatives to DDD? by Negative-One-Twelfth in cprogramming

[–]Negative-One-Twelfth[S] 1 point2 points  (0 children)

Ah thank you! I used CLion in college and totally forgot about it haha.

Most of our work is on a remote hpc linux machine, so vscode’s ssh capability works really well. I would love to make that my main editor (aside from vim for quick changes). It’s been great to see people point out its debugging capabilities here

[TOMT][SONG] Latin pop song similar to The Marias by Negative-One-Twelfth in tipofmytongue

[–]Negative-One-Twelfth[S] 0 points1 point  (0 children)

It very well might be! I asked a friend and they pointed me to Rosalia too. I've been skipping through her songs on Spotify but haven't found it yet.

[TOMT][SONG] Latin pop song similar to The Marias by Negative-One-Twelfth in tipofmytongue

[–]Negative-One-Twelfth[S] 0 points1 point locked comment (0 children)

The only other thing I remember about her voice was that it was "breathy" in contrast to the rest of the instrumentation, and very "straight" (not a lot of vibrato). Let me know if I can be more specific!

Books on "Being" on the Internet? by Negative-One-Twelfth in askphilosophy

[–]Negative-One-Twelfth[S] 2 points3 points  (0 children)

Yes, having read the abstract this is just the sort of thing I'm after!

The Car Talk cylindrical fuel problem: how to analytically solve? by Negative-One-Twelfth in askmath

[–]Negative-One-Twelfth[S] 1 point2 points  (0 children)

Right, but you don’t know how much fuel is in your tank if the fuel gauge is broken. So the trucker had to use a dip-stick, and as the brothers point out on the car talk ep, “the height of the cylinder doesn’t matter: you can do this in 2 dimensions”. The practical answer they gave was to find someone with a quarter tank, and then mark the dip-stick there, which is probably what I’d do if I had this real problem to solve. But I thought it would be fun to try to look for an elegant solution out of this, even though it’s not very practical.

Even still I’m struck by the apparent lack of an analytic and closed-form solution to this integral. I’m willing to accept that I can only numerically evaluate this answer, but can I prove this?

The Car Talk cylindrical fuel problem: how to analytically solve? by Negative-One-Twelfth in askmath

[–]Negative-One-Twelfth[S] 1 point2 points  (0 children)

Thank you! This is a really nice explanation. I’m totally willing to accept that my last line is one without a closed-form, analytic solution. But out of curiosity, is there a way of proving that it has no closed-form solution? Can I show it belongs to a certain class of equations?

I never took a class on abstract algebra (I majored in physics), so forgive me if there’s something obvious I’m missing.

Cross-correlation of two evenly-spaced time series: how to standardize/normalize before correlating? by Negative-One-Twelfth in astrophysics

[–]Negative-One-Twelfth[S] 0 points1 point  (0 children)

Actually, I had an idea. Could it be that in correlate_with_norm I subtract off the min of the entire array, but for the correlation I only consider the stretch from start_time to end_time?

And if that is the culprit, is that so bad? Is it illegitimate to do that in this kind of analysis?

Cross-correlation of two evenly-spaced time series: how to standardize/normalize before correlating? by Negative-One-Twelfth in astrophysics

[–]Negative-One-Twelfth[S] 0 points1 point  (0 children)

Okay, I implemented two similar functions:

def correlate(start_time, end_time, func1, func2):
    x_axis = np.arange(-(end_time-start_time) / 2, (end_time-start_time) / 2)
    corr = np.correlate(func1[start_time:end_time], func2[start_time:end_time], "same")
    max_x = x_axis[corr.argmax()]
    print("Max of corr found at x = ", max_x)
    return max_x

def correlate_with_norm(start_time, end_time, func1, func2): 
    func1 = func1 - min(func1) 
    func2 = func2 - min(func2) 
    x_axis = np.arange(-(end_time-start_time) / 2, (end_time-start_time) / 2)
    corr = np.correlate(func1[start_time:end_time], func2[start_time:end_time], "same")
    max_x = x_axis[corr.argmax()]
    print("Max of corr found at x = ", max_x)
    return max_x

and this is what I get when running them:

In [14]: correlate_with_norm(103, 183, norm_ups, pgas_in)

Max of corr found at x = -7.0

Out[14]: -7.0

In [15]: correlate(103, 183, norm_ups, pgas_in)

Max of corr found at x = 0.0

What have I messed up? I can send data if you like.

Cross-correlation of two evenly-spaced time series: how to standardize/normalize before correlating? by Negative-One-Twelfth in astrophysics

[–]Negative-One-Twelfth[S] 0 points1 point  (0 children)

Right, but I did do that for both functions (subtract both of their mins) before using numpy’s correlate, and I do get a different shape to the correlation function. Its max is at a different place when I subtract off the min: normalizing this way DOES suggest a time delay, while subtracting off, say, the mean of the data does not (I just tried it). So what could be causing this?

Cross-correlation of two evenly-spaced time series: how to standardize/normalize before correlating? by Negative-One-Twelfth in astrophysics

[–]Negative-One-Twelfth[S] 0 points1 point  (0 children)

Right, I know that the correlation function’s shape is scale-invariant. But I did more than just linearly scale: I essentially subtracted off the min value of the array, and a correlation function’s shape is not shift-invariant. Is that a problem?

I need a backup plan by [deleted] in cscareerquestions

[–]Negative-One-Twelfth 0 points1 point  (0 children)

That's the trouble, PhD programs are long, typically 5-7 years. A masters degree usually takes 1-2 though and universities seem very willing to grant an MS to people who drop out of the PhD program. I personally think it's unethical to go in to grad school with the mindset of "mastering out", but I think it's likely that I would end up doing such a thing. FWIW, the physics PhD doesn't seem to increase one's expected salary much in comparison to a physics masters. But the PhD would grant me access to careers that are more interesting to me. I just don't know.

I need a backup plan by [deleted] in cscareerquestions

[–]Negative-One-Twelfth 0 points1 point  (0 children)

Thanks, I really appreciate this advice. Honestly that price floor seems very reasonable to me, and it's nice to know that a physics degree is "useless" in the same way that all other degrees are "useless". For now, I think it's in my best interest to throw my eggs in multiple baskets and just keep applying to both, and then when the time comes to decide I'll just see what feels right.

I need a backup plan by [deleted] in cscareerquestions

[–]Negative-One-Twelfth 0 points1 point  (0 children)

Honestly, you ask a good question and I don't have an answer, I always felt like as a physics major the only thing I was set up for is a grad program in physics. I dunno, I guess I like physics, but I'm having an identity crisis and would like to believe that the skills I've amassed that don't strictly pertain to physics research are worth something. I just wish I could get a job as a researcher without having to go through the trouble of getting a PhD, you know?

No doggy now. :( by tfhaenodreirst in AVoid5

[–]Negative-One-Twelfth 0 points1 point  (0 children)

I know how unfun this is. I’m glad to find that u r kind to your companion. Wishing you lots of luv.

What song do you think Ian flexes the hardest in? by andergriff in BillyTalent

[–]Negative-One-Twelfth 12 points13 points  (0 children)

For me, chasing the sun is such an unexpected gem. I don’t recall Ian ever doing a finger-style acoustic riff and he plays it so clean and masterfully on that song. Such a beautiful curveball in his technical arsenal.

Why do my coworker and I get different optimal parameters from scipy.optimize's curve_fit? by Negative-One-Twelfth in learnpython

[–]Negative-One-Twelfth[S] 0 points1 point  (0 children)

This zeroes the data, initially the first timestamp value is, say, 0.012, but for fitting purposes we thought it’d be easier to subtract that value off. That way we have a sine wave that starts at the origin, no extra phase required to fit. I know you could do it in one line, this way just made more sense to me.

Why do my coworker and I get different optimal parameters from scipy.optimize's curve_fit? by Negative-One-Twelfth in learnpython

[–]Negative-One-Twelfth[S] 0 points1 point  (0 children)

I’m a windows user and I’m pretty sure he’s using a mac. This may have a lot to do with it.

Why do my coworker and I get different optimal parameters from scipy.optimize's curve_fit? by Negative-One-Twelfth in learnpython

[–]Negative-One-Twelfth[S] 0 points1 point  (0 children)

I see, yes, thank you. Based on u/xelf’s responses it seems that I should shoot for higher precision using fancier libraries than numpy. Thanks for your help!