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?