Sunday, November 18, 2018

talmud bavli - Returning Lost Property to a Gentile


Why is it forbidden to return lost property to a non-Jew?


Its been a while since I learnt the discussion about hashovas aveido (returning lost property) in Baba Metzia; but I just learnt Sanhedrin 76b where it says it is a sin, and cites a verse (Deuteronomy 29:19) to say "Lo Havei Hashem Sloach Lo" (God won't forgive him), and the Rashi there ("hamachzir aveido l'kuti/goy") which tries to explain it - make no sense to me.


Zogt Rashi: It's a bizui (degradation) to return a lost item to a non-Jew because there's no mitzvo (command; the verses is: "avedas ohicho", the lost property of your brother). But how is this different from Loshon Horo (gossip) which is forbidden to speak about a goy? Isn't it general middos (character traits), chessed (kindness), Kiddush Hashem (for God's greater glory)?


Not required I hear, but forbidden?!


Also see Rambam in Hilkhos G'zelo Va'aveido 11:3, where he makes some allowances where it would cause a big Kiddush Hashem, but base case is still forbidden.




Simulating analog filter using convolution or converting with fft


My task is simple; I want to simulate analog low-pass filtering of an input signal, using Python. Note that the input signal is an array of values, not an analytical function.


My first question is if it simply is possible? If so, where is the line drawn between making a digital (FIR/IIR) filter and simulating an analog filter?


My second question is how I, in python, can make two equivalent simulations, using convolution in one, and converting the input signal to frequency domain in the other. Convolution is used in the link below, and it would help me a lot to see how exactly the same thing would be done by instead using fft (even though I think it's using an FIR filter, not simulating an analog filter).


http://glowingpython.blogspot.nl/2012/02/convolution-with-numpy.html


Thanks a lot in advance!



Answer




What's not clear to me is what the fundamental difference (if any) is between simulating an analog filter and making a digital filter.




Either way, these functions will produce "ba" transfer function outputs, but the b and a are totally different.


For a 2nd-order filter, for instance, b = [b0, b1, b2] and a = [a0, a1, a2]. These are the coefficients of the transfer function.


For an analog filter, this represents a transfer function like this:


$$H(s) = \frac{b_2 s^2 + b_1 s + b_0}{a_2 s^2 + a_1 s + a_0}$$


For a digital filter, the transfer function is:


$$H(z)=\frac{b_0+b_1z^{-1}+b_2z^{-2}} {a_0+a_1z^{-1}+a_2z^{-2} }$$



Note that the input signal is an array of values



Then you are doing digital filtering. You can simulate analog filtering this way, but it's only going to be a simulation.



All the Python IIR filter functions you're talking about, when outputting a digital filter, design it as an approximation of the analog filter using an analog filter transfer function prototype and then converting it to digital using the bilinear transform and frequency warping. Yes, they can output analog transfer functions, but I think that's only useful for building actually analog electronic filters, or for plotting the frequency response, impulse response, etc.


The Bessel in particular is a bad approximation as you get near fs/4, because the important property of a Bessel filter is group delay, not amplitude, and phase/group delay is not preserved by the bilinear transform (red vertical line is fs/4):


enter image description here


More plots of digital Bessel filter


You can make the simulation closer to what an analog filter would produce by putting a large margin between the highest frequency in your signal and the sampling frequency, called oversampling. Assuming your "array of values" is correctly bandlimited, then you can upsample them and then apply the digital filter using lfilter and the ba digital filter coefficients you found earlier. If not, you need to bandlimit the analog signal and then sample it at a significantly higher rate. How did you get your sampled signal? If you are generating it digitally, it is probably not bandlimited, unless you specifically thought of bandlimiting while generating it.



for example a 1st-order Bessel filter



All 1st-order filters are the same, the "1st-order Bessel" is the same thing as a "1st-order Butterworth" or anything else.


What types of hair - and whose hair - are included in mourning-related hair-cutting prohibitions?


When there are hair-cutting prohibitions (or restrictions) for mourning-related practices, what types of hair are included? Is it just hair on the top of one's head and/or facial hair? Do the restrictions apply equally to men and women?* Do any leniencies that might apply in certain situations apply equally to men and women? Do those same leniencies apply to all hair types that are included in the restrictions?


*The reason I ask about both men and women in this question, is that men and women may have different types of hair and/or different types of hair that one cares about grooming (e.g., facial hair on men, "נימא" on women, etc.).





halacha - Is it considered Pikuach Nefesh if you break Shomer Negiah to give someone emotional comfort?


I've asked myself this before, but I'm not sure. Say that you see someone depressed, severely depressed and they just need a hug. If they're the same gender, that's all fine and dandy. However, if you're not the same gender then you're obviously doing negiah. Now, I understand there's some wiggle room with rabbinic mitzvot (however, Rambam and other halachic commentators claim that negiah is actually a biblical commandment). Could such a touch (even if sexual desire is derived from it) be excused or is it still an avera?




Answer



RS quoted a fascinating Gemara above, however there are a lot of ways it's interpreted.


Don't get started on trying to psychologically diagnose "sort of kind of pikuach nefesh", unless you're a trained professional or it's clear this person is a danger to themselves or others (at which point you need to call in the professionals).


Let's try and break down this very messy question a bit.


When some people say "I'm shomer negiah", they mean "I don't touch the opposite gender [other than spouse] at all." To others, it means "I don't do affectionate touching." There's a huge difference between those two.


Non-affectionate touching: The Bait Yosef actually demands the former and prohibits a man from taking his nida wife's pulse even if she's seriously ill. My understanding is that very few people follow this opinion. (Rabbi Yehuda Herzl Henkin observes this was not Rambam's position.)


In a recent yutorah mp3 on nursing, someone asked Rabbi Hershel Schachter about therapeutic touch, e.g. a female nurse who reaches out to hold an elderly man's hand as he's wincing in pain from an injection. Rabbi Schachter is of the opinion that non-affectionate touch is permissible, so this was just a question of whether this touch is "affectionate"; he thought it wasn't and therefore this was a reasonable course of action.


As soon as we get to hugs or kisses though, this becomes a lot less clear. Rambam's classic examples of affectionate touching are hugging and kissing! Trying to differentiate hugs is quite complicated.


I know of stories of good observant Jews who hugged a grieving friend, but don't ask me if that was technically within halacha.


As a matter of policy it's a very bad idea. Rabbi Kenneth Brander warned a group of rabbinic students about setting appropriate boundaries; he said it's likely you'll get a woman in your office who is falling apart and having horrible tragedies in her life and you'd think giving her a hug is the right thing to do -- don't. (YU shiur on "men of tzniut" or "gavrei tzniut" or something like that.)



There's a recording in which Rabbi Aaron Rakeffet Rothkoff similarly addresses this dilemma: "what if you're a psychologist seeing a teenage girl and you know that putting an arm around her will do a tremendous amount of good..." - a voice from the back of the room shouts out - NO!! -- Rabbi Rakeffet replies to his student that he's most likely correct, but it is a difficult situation.


molecules - Why is O2 enough to form a mole of Oxygen?



I understand that this is the most basic knowledge of moles, however I'm still unsure - according to easy research, $\ce{O2}$ forms a mole of Oxygen. As a mole is $6.022*10^{23}$, exactly what on the periodic table can we use to find out that it's 2 Oxygen in one mole? Wouldn't it be $6.022*10^{23}$, instead of 2?



Answer



$\rm O_2$ is the most common form of oxygen---the periodic table won't really tell you that.


Avogadro's number tells you how many particles there are in a mole.


There are $6.022\times 10^{23}$ O atoms in a mole of O atoms.


There are $6.022\times 10^{23}$ $\rm O_2$ molecules in a mole of $\rm O_2$.


Since you have 2 oxygen atoms in one $\rm O_2$ molecule, there are $2\times 6.022\times 10^{23}$ O atoms in a mole of $\rm O_2$.


Do you see the difference?



halacha - Putting Oreos in your Cholent


According to the certifying agency of Nabisco Oreo cookies, which are marked OU-D:



The equipment is not necessarily cleaned before the production of these cookies, and there may be a small amount of dairy residue present. Nonetheless, the dairy component would be minimal, and from a Halachic perspective, the dairy residue is nullified (botel bishishim) and of no consequence. The bottom line of all this is that these cookies may be consumed after meat and poultry, but not simultaneously.



IMSMC, according to the Maharshal, being stringent by not relying on the halachik principle of nullification (bittul) is considered heretical/quasi-heretical (as unjustified rejection of a traditional halachik principle; as opposed to the traditional principle of ein mevatlin issur l'chatchila - not intentionally nullifying forbidden food). Nonetheless, this does not appear to reflect normative practice.


However, in the case of "dairy" equipment, there appears to be the added issue that it is not clear that there was even bittul to begin with (i.e. based on the language cited above, it seems there is at least an additional uncertainty whether any given cookie has even a trace amount of dairy).


Accordingly, which halachic authorities (rishonim and/or achronim) does the OU rely on in crafting its ruling that even an alleged uncertainty (safek) of a possible trace amount of heter dairy should nonetheless prevent eating the overall product together with meat (assuming, of course, that Oreos are considered nosein taam lishvach [tasty] in a cholent)?





tefilla - Is it ok to pray for a non-religious friend that he become religious?


Is it ok to pray for a non-religious friend that he should become religious? In the end, he has to make the decision for himself, so can the prayer influence somehow his free will?





periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...