Thursday, 31 December 2015

everyday chemistry - Which side of an aluminum foil should I put in contact with food?


Aluminum foil has two sides: a matte one, and a shiny one.
My question is: which one should I put in contact with food?


Criteria are lowest risk of toxicity and best qualities for food preservation (e.g. do not favor oxidizing, or react with acid nor alkaline ingredients)




For information, I've come across these several explanations; they are however contradictory (and might not be accurate):




  • Both side have same properties. The difference in terms of appearance is only due to the manufacturing process. (Two foils are laminated at the same time, so each foil is in contact with the rolls on one side only — hence the asymmetrical look).
    In this case, we can use both side of the foil.

  • Aluminum foil is actually made of two layers: one of aluminum, another that is coating. The surface of the aluminum layer that is in contact with atmosphere oxidizes and turns into aluminum oxide — hence the matte side.
    In that case, we should use the shiny side, since aluminum oxide is not that healthy.




halacha - Halachic permissibility of playing cards (i.e., poker) for money


Are there any important halachic issues related to gambling--specifically, on card games? (I'm thinking Texas Hold 'Em, but kvitlach also comes to mind.)


Obviously it can't be done on Shabbos or Yom Tov. Anything else to be aware of?



Answer



If it is being played for money there is an issue of stealing.


The source for gambling in general is found in the Mishna in Sanhedrin (24b-25a)


See this site:




The Halachic Prohibitions Involved in Gambling


The Mishnah in two separate places addresses the issue of the worth of a gambler's testimony in a Jewish court of law.


In Tractate Rosh Hashanah Chapter 1 Mishnah 8 the Mishnah lists those that are disqualified from giving testimony about the 'new moon'. Among the others that are mentioned are two categories of people that concern us.


(a) 'Mesahakei Kubia' literally dice players or gamblers.1


(b) 'Mafrihe Yonim' literally pigeon-fliers or pigeon racers.


Both categories are disqualified to give testimony about the new moon in the Beth Din - the Jewish Court.2


In Talmud Sanhedrin another Mishnah, in which there is a debate between the Hakhamim (Rabbis) and Rabbi Yehuda dealing with the ineligibility of these two categories of individuals from being judges or giving testimony3 in monetary cases is quoted as follows:


These are the ones ineligible to be judges or witnesses: One who plays with dice, or pigeon fliers. Rabbi Yehudah said When are dice-players ineligible to adjudicate or testify? When they have no trade but this, but if they have a trade besides this they are eligible.


Rashi explains Rabbi Yehudah's view as people whose sole occupation is gambling are not involved in doing anything useful. As a result, they are unacquainted with basic business law and commerce, and have no aversion to illegal activity. However, one who engages in some other form of occupation is not flawed in this way and remains eligible.



The Gemara bring down a debate about why a dice-player's activity disqualifies him:


Rami Bar Hama says that the dice player is disqualified because the wager agreement he is entering into is an example of asmachta4, because each player consents to the terms of the game only because he expects to win. Since the loser does not willingly surrender the wagered amount, the winner is considered to be stealing when he collects, and is thus ineligible as a witness or judge.5


Rabbi Sheshet says this agreement is not considered an asmachta. According to this opinion the only situations that involve asmachta are when the individual relies on his own ability. Dice players realize that the outcome of the game is determined by chance and not their own personal skill6. Rather, dice players are disqualified because they are not involved with furthering the general welfare of society.


The Talmud explains that the difference between these two opinions is the case where the gambler learned another profession.


Rami bar Hama would still disqualify the gambler by virtue of his accepting winnings based on a non-binding asmachta agreement, whereas according to Rav Sheshet he is eligible because his second occupation is socially useful.7


According to Rami bar Hama the prohibition involved in gambling is not the gambling itself but taking the winnings which involves the 'dust of robbery'.


According to Rav Sheshet there is no prohibition in taking the winnings, the problem is being a gambler. This occupation is distasteful as is non productive.


The Rambam8 (Hilchot Gezela Chap. 6 Halacha 10) codifies that gambling between two parties is Rabbinically prohibited as it is classified as robbery by the Rabbis. Even though the winner took the proceeds with the full knowledge and consent of the loser, since he took his money for nothing, by playing, it is considered robbery. Similarly, wagering on animals and birds is prohibited rabbinically.


However the Rambam in Hilchot Edut9 says that a person who plays dice is disqualified from giving testimony only if he is a professional gambler and has no other occupation, since he is not engaged in settling the world. He must be living of the proceeds of his gambling which is the 'dust of robbery'10. Similarly a person who wagers on animal and bird races is disqualified if he has no other occupation except this.


The Shulhan Arukh follows the opinion of Rambam by classifying gambling as asmachta which would mean that the winner is not entitled to the proceeds of his victory and retaining would be considered stealing.**22 **However, like Rambam, he also only disqualifies the gambler as a witness if gambling is his only means of livelyhood,23 thereby creating the same compromise between Rab Sheshat and Rami Bar Hama as did Rambam. The Remah however disagrees with the Shulhan Arukh and decides the law according to the Tosaphot and Mordecha, The Tosaphot and the Mordechai16 explain that even according to the above mentioned opinion which permits "Dice Playing" as long as one has another profession, it is only permitted to do so if the actual cash is placed on the table and the money is transferred to the winner immediately follwing his victoryi.24




There is a further issue of wasting time:



The Minhat Yitzhak49 discusses the general implications of playing games in general. He quotes the classic ethical work Reishit Hochma50: "Included in a session of scoffers51 are those that play dice and other games, even though they do not play for money, which is prohibited because of robbery, it is considered a session of scoffers



quantum chemistry - What exactly is an orbital?


What exactly is an orbital? Atomic or molecular.


Is it the function that describes the behaviour of the electron?


Is it the Schroedinger's equation solution, e.g., for Hydrogen atom?


Is it the probability of finding any electron of an atom in any specific region around the atom's nucleus?


Maybe all these describe the same thing. What is it?




sources mekorot - Abridged Birkat HaMazon - Online?


HaRav Binyamin Kwalwasser from Yeshivat Lev Hatorah taught us that Rabbi Abadi is of the opinion that it is better to say a shorter version of Birkat Hamazon after eating than not to say it at all. (IIRC, R' Kwalwasser said that R' Baruch Simon from YU agrees with R' Abadi regarding this subject.)


My question is: Is this abbreviated form of Bentching available on the Internet, as a PDF file or otherwise?



Answer



Here is a link for the Android version of Rav Abadi's Birkat Hamazon. Visit: https://play.google.com/store/apps/details?id=com.cqlsys.birkathamazonhakatzar



tefilla - Avinu Malkienu on Shabbos


Why do we not say Avinu Malkienu on Shabbos and why is the Teffilah of Neilah the exception to this very rule?



Answer



The Magen Avraham gives two reasons:





  1. The Lvush says the reason is because Avinu Malkeinu is parallel to the middle blessings, which we don't say on Shabbos. The Magen Avrahom says this reason doesn't explain not saying Avinu Malkeinu Friday afternoon though.




  2. Because we are not allowed to ask for material needs on Shabbos. The Shaar Hakolel writes that according to the Siddur of R' Shneur Zalman of Liadai, a day in which we don't say Tachanun we don't mention sins or pray for physical needs, unless the prayer was instituted in the time of the Gemara.




The Shulchan Aruch rules that we do say Avinu Malkeinu on Yom Kippur that falls out on Shabbos. The Rama says that our custom is that we do not.


The Magen Avraham says that by Neilah there are two reasons why we say Avinu Malkeinu even when Yom Kippur falls out on Shabbos:




  1. The Lvush writes that Avinu Malkeinu is said after Shabbos is technically over.

  2. Even if one reaches Neilah during the day, because it is the time of the finalizing of the judgement we could rely on the Beis Yosef.


Why is practical kabbalah not considered kishuf?


To preface I know next to nothing about so called 'practical kabbalah'. But from the few things I have read about, things like face or palm reading, making a golem (essentially an android) or any other 'magical' practice seem to violate the prohibition of lo t'chashef (sorcery)1 2 3. Why is this not so?


1 Devarim 18:10
2 Tur, Yorah Deah 179:13-16
3 Rambam, Negative Commandment 34



Answer



The Gemara writes: "Abaye said, 'The laws about sorcery parallel the laws of [forbidden labor] on Shabbos. Some of them [i.e., some acts, are punishable] by stoning; some of them [leave the perpetrator] exempt [from stoning,] but [are nonetheless] forbidden; and some of them [are] permissible in the first place....[Actions that are] permissible in the first place [are those that are] like [the actions] of Rav Chanina and Rav Oshaya, who would delve into the laws of Creation every Erev Shabbos, and a calf which was at one third of its maturity would be created from them, and they would eat it (Sanhedrin 67b, translation from Rabbi Adlersteins adaptation of Be'er HaGolah of the Maharal.)


The Maharal explains while there is certainly overlap between magic and the mysticism of the Sages, allowing for this "grouping", there is a fundamental difference insofar as magic is contravening the laws of nature while the "permitted magic"/kabbalah/ what Rav Chanina and Rav Oshaya did is supernatural but not against nature. (ibid page 37,38).



words - What Talmudic manuscripts (if any) have Jesus instead of Balaam? / What Does 'MS.M. Jesus' mean?


What manuscripts (if any) have Jesus instead of Balaam?


I'm aware that some claim that balaam is a code-word for Jesus. I know Rabbi Gil Student makes a good argument that it cannot be



I have read that the 19th century reform scholar Abraham Geiger thought that Balaam was code for Jesus.


This Talmudic passage from the Soncino (an orthodox British publisher) has "MS.M. Jesus" in the footnotes.


http://halakhah.com/gittin/gittin_57.html



He then went and raised Balaam by incantations. He asked him: Who is in repute in the other world? He replied: Israel. What then, he said, about joining them? He replied: Thou shalt not seek their peace nor their prosperity all thy days for ever.1 He then asked: What is your punishment? He replied: With boiling hot semen.2 He then went and raised by incantations the sinners of Israel.3


3 [MS.M. Jesus].



I have heard that "MS" stands for manuscript.


And if not then what would MS.M. Jesus mean? What is the M after MS.?


I've heard of Hesronot HaShas having parts of the Talmud that were censored by christian censors. Does that have Jesus in it instead of Balaam? It doesn't seem conceivable to me that christian censors would've changed Jesus to Balaam though.



I'm interested if anybody before Geiger claimed that Balaam was Jesus. How far back the claim goes and who made it.


Note


further to and from magicker72's great comments - So we have the Soncino abbreviations http://halakhah.com/tabbrev.html And To my question of what Talmudic manuscripts have Jesus instead of Balaam, it seems none. And to my question of who before Geiger equated Jesus with Balaam, I still see no examples given. It appears that rabbi Gil student is using a version of the Talmud that has Yeshu , though Gil argues that Yeshu is not Jesus.
http://www.angelfire.com/mt/talmud/jesusi.html
http://www.angelfire.com/mt/talmud/jesus.html and http://www.angelfire.com/mt/talmud/jesusnarr.html though clearly the Soncino translators of Gittin 57a, believe Yeshu, was Jesus http://halakhah.com/gittin/gittin_57.html (footnote for "sinners of israel" says Jesus - sinners of Israel being a censored version in Soncino's Hebrew and English, Yeshu being the actual version). So looking at the text as Gil's link, so Munich manuscript, not Soncino, it makes clear, Balaam is in boiling semen and Yeshu in boiling excrement with those that mock the sages. "What is your punishment? [Yeshu answered]: In boiling excrement."




halacha - What is the original halachic source for a woman covering her collarbones out of modesty (tznius)?


Many contemporary instructions on women's modesty (tznius) say that necklines have to be high enough to cover the collarbones.


I can certainly accept that if this is the communal standard, it should be upheld; or that it makes a good guideline to avoid problems of "well exactly where below the collarbone is too low."


But other than that, is there an original halachic source for it? Do we know what the first source was to have stated "collarbones?" (Is it called עצם הבריח or עצם הצוואר)



Answer



Halichos Bas Yisrael 4:4 (note 6) cites Mishnah Berurah 75:2 as saying this, although I haven't found it there (he just says that "her face and hands, whatever is normally exposed according to local custom," are not considered ervah as far as a man saying Shema). HBY also references Kuntres Malbushey Nashim, but I don't have that to see what he says.


One possibility: we find that halachah considers the neck area (in an animal) to extend downwards until the upper lobes of the lungs (Shulchan Aruch, Yoreh De'ah 20:1). Since in a person this point is demarcated by the collarbone (see image here), that may be a reason to use that as the dividing line between the neck (about which there's no statutory source requiring it to be covered) and the body.





Edit - looks like my facts in the second paragraph above are wrong - normal human lungs apparently extend some distance beyond the collarbone (as in this image of a chest x-ray). Shulchan Aruch there does say that the dividing line (for the laws of shechitah) is how far the lungs extend "when the animal stretches out its neck to graze," so maybe for tznius too, the same principle would operate - we'd have to know where the upper lobes of the lungs are when a person extends his or her neck. I guess we'd need to ask an M.D.


halacha - Using a Mitzvah to Get Prayers Answered


If one prays specifically after performing a Mitzvah, in the hopes that G-d will be more likely to answer their prayer:


Is that considered improper, as it is using the Mitzvah for his/her own benefit? Or is it an acceptable and valid way to get prayers answered?




quantum chemistry - Is coupled cluster variational for two electrons?


I know that coupled cluster (CC) is not variational for the general case. However, if we only have two electrons with one nucleus, CCSD should be exact for this system like full configuration interaction (CI). Since full CI is variational, can we argue that CCSD is also variational for this special case?




shabbat - Yom Kippur more lenient than Shabbos?


The potential punishment for an av melacha on Shabbos is stoning (ch"v). (Obviously, only under certain circumstances and after repeated attempts to dissuade the sinner.) However, I learned here that the potential punishment for doing an [av] melacha on Yom Kippur is only kareit. Kareit is the fifth of Rambam's eight levels of punishment, whereas death by stoning is the first. This is a big difference in strictness.


I understand that in practice in modern times, this doesn't change anything. However, if Yom Kippur is the Shabbas Shabbason and overrides Shabbat in almost every other way(1), why would the punishment for melacha on Yom Kippur be so much less severe?


Related: Melachas on Yom Kippur


Yom Kippur falling out on Shabbos




REFERENCES




  1. Lopatin, Rabbi Asher. "Celebrating a Conflicted Relationship with God." In Naming God: Avinu Malkeinu— Our Father, Our King, edited by Rabbi Lawrence A. Hoffman, PhD, 231-35. Prayers of Awe. Woodstock, VT: Jewish Lights Publishing, 2015.



Answer



The Gemara in Megila 22b inform us:



נקוט האי כללא בידך כל דטפי ליה מילתא מחבריה טפי ליה גברא יתירא הלכך בר''ח ומועד דאיכא קרבן מוסף קורין ארבעה ביו''ט דאסור בעשיית מלאכה חמשה ביוה''כ דענוש כרת ששה שבת דאיכא איסור סקילה שבעה‏



In English:




The holier (Lit. better) a day, the more people get called up to the Torah. Therefore, on Rosh Chodesh and Chol HaMoed where there's a Mussaf sacrifice, we call up 4. On Yom Tov when work is forbidden, we call up 5. On Yom Kippur 6, because its punishment is Karet. On Shabbat, since its punishment is stoning, we call up 7.



So we see that Shabbat is considered superior to Yom Kippur according to the Gemara. Your question is used as a proof of this.


Wednesday, 30 December 2015

mysticism kabbalah - Playing with non-kosher animals


I have often heard it said that there is a tradition amongst kabbalists not to own, play with or possibly even look at animals that are not kosher. Assuming that this is correct, my question is twofold:


1) I would like a source for this tradition;


2) I would like to know how it is that people deal with the Mishna, Shabbat 9:7. There, Rabbi Yehuda is quoted as noting that people used to give their children dead non-kosher grasshoppers to play with.


Just to be clear, I'm not looking to understand Rabbi Yehuda, whose opinion is not problematic for me. I want to know how religious Jews (might) have dealt with this passage, if it is true that they frown upon coming into contact with impure animals.




grammar - Using も in place of を


I'm currently trying to get back into studying Japanese. I want to take the JLPT N3 this summer. To get myself in the mode for this I am first looking at the N4 tests on the JLPT website.


The reading parts and kanji comprehension are no challenge for me. I can get through the vast majority of that without trouble and where I do slip up I can understand why.


Grammar however...grammar is the devil.



One of the supposedly easiest questions on the test is as follows-



わたしの父は中国語も英語x話せます



My instinct was for the answer to be を. も means in addition, so you have to have an actual action for the も to be in addition to, right?


No. It turns out the answer is も. I fail and I don't understand the reasons. Can anyone explain why in this context を is incorrect and も is right?


It is a bit of an unusual sentence and a break from textbook patterns of the additional も. The way I'm used to is one person says I like y/I come from z, and the other person says 私も. Its not a particle I generally see used too often in this also sense, where I see it its usually as a negative. To have the も come first like this confuses me.



Answer




わたしの父は中国語も英語も話せます。

My father can speak both Chinese and English.



~も~も is how you say "both ... and ..." in Japanese. It works with all particles, as も does by itself, i.e. usually replaces は, が, を and follows へ, に, etc.


It also works with more than two も's, e.g.



わたしの父は中国語も英語もドイツ語も話せます。
My father can speak (all of) Chinese, English and German.



The point is that everything in the list is marked by も. If you said




わたしの父は中国語も英語を話せます。



it just sounds wrong, but if it means anything, one would have to assume that も replaces が, which would give



As for my father, his Chinese can also speak English.



blessing - "Baruch shekivanti..."



There is a phrase of self-compliment people use when they find that they have independently arrived at the same conclusion as someone great. It begins with the words "ברוך שכיוונתי", translated according to my estimation as "blessed [-] that I have aligned".


What is the proper ending to this phrase?


What is the exact translation?


What is its source?


When is it appropriate to use it?




random - What is the distinction between ergodic and stationary?



I have trouble distinguishing between these two concepts. This is my understanding so far.


A stationary process is a stochastic process whose statistical properties do not change with time. For a strict-sense stationary process, this means that its joint probability distribution is constant; for a wide-sense stationary process, this means that its 1st and 2nd moments are constant.


An ergodic process is one where its statistical properties, like variance, can be deduced from a sufficiently long sample. E.g., the sample mean converges to the true mean of the signal, if you average long enough.


Now, it seems to me that a signal would have to be stationary, in order to be ergodic.



  • And what kinds of signals could be stationary, but not ergodic?

  • If a signal has the same variance for all time, for example, how could the time-averaged variance not converge to the true value?

  • So, what is the real distinction between these two concepts?

  • Can you give me an example of a process that is stationary without being ergodic, or ergodic without being stationary?




Answer



A random process is a collection of random variables, one for each time instant under consideration. Typically this may be continuous time ($-\infty < t < \infty$) or discrete time (all integers $n$, or all time instants $nT$ where $T$ is the sample interval).



  • Stationarity refers to the distributions of the random variables. Specifically, in a stationary process, all the random variables have the same distribution function, and more generally, for every positive integer $n$ and $n$ time instants $t_1, t_2, \ldots, t_n$, the joint distribution of the $n$ random variables $X(t_1), X(t_2), \cdots, X(t_n)$ is the same as the joint distribution of $X(t_1+\tau), X(t_2+\tau), \cdots, X(t_n+\tau)$. That is, if we shift all time instants by $\tau$, the statistical description of the process does not change at all: the process is stationary.

  • Ergodicity, on the other hand, doesn't look at statistical properties of the random variables but at the sample paths, i.e. what you observe physically. Referring back to the random variables, recall that random variables are mappings from a sample space to the real numbers; each outcome is mapped onto a real number, and different random variables will typically map any given outcome to different numbers. So, imagine that some higher being as performed the experiment which has resulted in an outcome $\omega$ in the sample space, and this outcome has been mapped onto (typically different) real numbers by all the random variables in the process: specifically, the random variable $X(t)$ has mapped $\omega$ to a real number we shall denote as $x(t)$. The numbers $x(t)$, regarded as a waveform, are the sample path corresponding to $\omega$, and different outcomes will give us different sample paths. Ergodicity then deals with properties of the sample paths and how these properties relate to the properties of the random variables comprising the random process.


Now, for a sample path $x(t)$ from a stationary process, we can compute the time average $$\bar{x} = \frac{1}{2T} \int_{-T}^T x(t) \,\mathrm dt$$ but, what does $\bar{x}$ have to do with $\mu = E[X(t)]$, the mean of the random process? (Note that it doesn't matter which value of $t$ we use; all the random variables have the same distribution and so have the same mean (if the mean exists)). As the OP says, the average value or DC component of a sample path converges to the mean value of the process if the sample path is observed long enough, provided the process is ergodic and stationary, etc. That is, ergodicity is what enables us to connect the results of the two calculations and to assert that $$\lim_{T\to \infty}\bar{x} = \lim_{T\to \infty}\frac{1}{2T} \int_{-T}^T x(t) \,\mathrm dt$$ equals
$$\mu = E[X(t)] = \int_{-\infty}^\infty uf_X(u) \,\mathrm du.$$ A process for which such equality holds is said to be mean-ergodic, and a process is mean-ergodic if its autocovariance function $C_X(\tau)$ has the property: $$\lim_{T\to\infty}\frac{1}{2T}\int_{-T}^T C_X(\tau) \mathrm d\tau = 0.$$


Thus, not all stationary processes need be mean-ergodic. But there are other forms of ergodicity too. For example, for an autocovariance-ergodic process, the autocovariance function of a finite segment (say for $t\in (-T, T)$ of the sample path $x(t)$ converges to the autocovariance function $C_X(\tau)$ of the process as $T\to \infty$. A blanket statement that a process is ergodic might mean any of the various forms or it might mean a specific form; one just can't tell,


As an example of the difference between the two concepts, suppose that $X(t) = Y$ for all $t$ under consideration. Here $Y$ is a random variable. This is a stationary process: each $X(t)$ has the same distribution (namely, the distribution of $Y$), same mean $E[X(t)] = E[Y]$, same variance etc.; each $X(t_1)$ and $X(t_2)$ have the same joint distribution (though it is degenerate) and so on. But the process is not ergodic because each sample path is a constant. Specifically, if a trial of the experiment (as performed by you, or by a superior being) results in $Y$ having value $\alpha$, then the sample path of the random process that corresponds to this experimental outcome has value $\alpha$ for all $t$, and the DC value of the sample path is $\alpha$, not $E[X(t)] = E[Y]$, no matter how long you observe the (rather boring) sample path. In a parallel universe, the trial would result in $Y = \beta$ and the sample path in that universe would have value $\beta$ for all $t$. It is not easy to write mathematical specifications to exclude such trivialities from the class of stationary processes, and so this is a very minimal example of a stationary random process that is not ergodic.



Can there be a random process that is not stationary but is ergodic? Well, NO, not if by ergodic we mean ergodic in every possible way one can think of: for example, if we measure the fraction of time during which a long segment of the sample path $x(t)$ has value at most $\alpha$, this is a good estimate of $P(X(t) \leq \alpha) = F_X(\alpha)$, the value of the (common) CDF $F_X$ of the $X(t)$'s at $\alpha$ if the process is assumed to be ergodic with respect to the distribution functions. But, we can have random processes that are not stationary but are nonetheless mean-ergodic and autocovariance-ergodic. For example, consider the process $\{X(t)\colon X(t)= \cos (t + \Theta), -\infty < t < \infty\}$ where $\Theta$ takes on four equally likely values $0, \pi/2, \pi$ and $3\pi/2$. Note that each $X(t)$ is a discrete random variable that, in general, takes on four equally likely values $\cos(t), \cos(t+\pi/2)=-\sin(t), \cos(t+\pi) = -\cos(t)$ and $\cos(t+3\pi/2)=\sin(t)$, It is easy to see that in general $X(t)$ and $X(s)$ have different distributions, and so the process is not even first-order stationary. On the other hand, $$E[X(t)] = \frac 14\cos(t)+ \frac 14(-\sin(t)) + \frac 14(-\cos(t))+\frac 14 \sin(t) = 0$$ for every $t$ while \begin{align} E[X(t)X(s)]&= \left.\left.\frac 14\right[\cos(t)\cos(s) + (-\cos(t))(-\cos(s)) + \sin(t)\sin(s) + (-\sin(t))(-\sin(s))\right]\\ &= \left.\left.\frac 12\right[\cos(t)\cos(s) + \sin(t)\sin(s)\right]\\ &= \frac 12 \cos(t-s). \end{align} In short, the process has zero mean and its autocorrelation (and autocovariance) function depends only on the time difference $t-s$, and so the process is wide sense stationary. But it is not first-order stationary and so cannot be stationary to higher orders either. Now, when the experiment is performed and the value of $\Theta$ is known, we get the sample function which clearly must be one of $\pm \cos(t)$ and $\pm \sin(t)$ which have DC value $0$ which equals $0$, and whose autocorrelation function is $\frac 12 \cos(\tau)$, same as $R_X(\tau)$, and so this process is mean-ergodic and autocorrelation-ergodic even though it is not stationary at all. In closing, I remark that the process is not ergodic with respect to the distribution function, that is, it cannot be said to be ergodic in all respects.


periodic table - Is there a function to approximate atomic mass from the atomic number?


The product of $2Z$ generally approximates the value of $m_\mathrm{a}$ of atoms that comprise relatively few protons. Whereas, the product of $2.5Z$ generally approximates the value of $m_\mathrm{a}$ of atoms that comprise relatively many protons. The product of $((2+2.5)/2)Z$ generally approximates the value of $m_\mathrm{a}$ of atoms that comprise a moderate number of protons.


What function from the $Z$ values produces a value that maximally approximates the $m_\mathrm{a}$ that corresponds to $Z$?



Answer



The short answer is that you can find a power-law fit ($1.61Z^{1.1}$) with low average error.



I'd never really thought about it much, but after downloading the IUPAC Atomic Weights, I decided to do some curve fitting.


Here's a linear fit between atomic number and atomic mass: linear fit of atomic mass from atomic number


As you say, the fit isn't very good for small $Z$, but the overall fit isn't bad - the mean absolute error (MAE) is $2.821 \:\mathrm{u}$, and taken as a whole, the data is surprisingly linear. (Well, surprising to me.)


So I thought of a quadratic fit, requiring the intercept to be 0,0 to ensure the best fit for small $Z$:


quadratic fit of atomic mass from atomic number


Looks better, right? Certainly the fit is much better for first and second row elements, but the MAE only reduces to $2.749 \:\mathrm{u}$.


So I went up to a cubic fit, again requiring 0,0 for the intercepts:


cubic fit of atomic mass from atomic number


Aha, now we're talking! We get the subtle nonlinearities, and the MAE is down to $1.36 \:\mathrm{u}$.


Thanks to the comment by Nicolau below, I performed a power-law fit.



power-law fit


So that gives a power-law fit with MAE of $0.01 \:\mathrm{u}$ and a fairly easy-to remember function:


$m_a \approx 1.61Z^{1.1}$


Recognition of Chabad conversions


I have read and heard in certain places that among certain Orthodox groups, if one converts with Chabad-Lubavitch that their conversion will not be valid, if someone were to convert with Chabad and then decide later to join the Breslov movement, or Satmar. Would that person have to undergo conversion once more? I want to convert to Judaism and am currently at a Chabad shule but I have been becoming more interested in the Breslov movement, and there is no Breslov shule in my country, would I have to undergo conversion once more to be accepted fully in other Orthodox groups if I had converted with Chabad already?




parashas yisro - Lo Sachmod Prat U'klal



Don't covet your friend's house. Don't covet the wife of your friend, nor his slave, nor his maidservant, nor his ox, nor his donkey, nor anything that is to your friend (Shemos 20:14).



Once the passuk says "anything that is to your friend," what need is there for the previous items mentioned? I can only assume this is a prat u'klal setup, in which we apply the teaching to all cases. Nevertheless, the specifics are there to teach you something else - see further discussion here. So what is added by the peratim here?



Note that the same question may be asked on the parallel in Va'Eschanan:



Do not covet your friend's wife. Do not desire your friend's house, his field, nor his slave, nor his maidservant, his ox, nor his donkey, nor anything that is to your friend (Devarim 5:18).




Answer



You need to read the Mechilta:



"לא תחמוד בית רעך" - כלל. "ועבדו ואמתו ושורו וחמורו" - פרט. כלל ופרט - אין בכלל אלא מה שבפרט. וכשהוא אומר


Once the passuk says "anything that is to your friend," what need is there for the previous items mentioned? I can only assume this is a prat u'klal setup --> RIGHT But it is a kelal ufrat ukhlal


"וכל אשר לרעך" - חזר וכלל. אי אתה דן אלא כעין הפרט:‏



in which we apply the teaching to all cases --> not exactly because it is not a perat ukhlal but a kelal ufrat ukhlal.


The last kelal results in a restricted extension of the perat {and the multiple examples are needed to define a couple of criteria which restricts the kelal} .



מה הפרט, מפורש בדבר שהוא קונה ומקנה - אף כלל, מפורש בדבר שהוא קונה ומקנה.‏



אי מה הפרט, מפורש בנכסים המטלטלין שאין להם אחריות - אף אין לי אלא נכסים המטלטלין שאין להם אחריות? וכשהוא אומר במשנה תורה (דברים ה יח) "שדהו", - מה הפרט מפורש בדבר שהוא קונה ומקנה - אף אין לי אלא בדבר שהוא קונה ומקנה. אי מה הפרט, מפורש בדבר שאינו בא ברשותך אלא ברצון בעלים - אף אין לי אלא דבר שאי איפשר לבא ברשותך אלא ברצון בעלים? יצא שאתה חומד בתו לבנך או בנו לבתך, או אפילו חומד בדבור? ת"ל (דברים ז כה) "לא תחמוד כסף וזהב עליהם", מה להלן עד שעושה מעשה - אף כאן עד שעושה מעשה:‏



The Mechilta tested several definitions for the restricted extension of the kelal, the conclusion is ruled in Shulchan Aruch Choshen Mishpat 359, 10:



כָּל הַחוֹמֵד עַבְדּוֹ אוֹ אֲמָתוֹ, אוֹ בֵּיתוֹ אוֹ כֵּלָיו שֶׁל חֲבֵרוֹ, אוֹ כָּל דָּבָר שְׁאֶפְשָׁר שֶׁיִּקְנֵהוּ מִמֶּנּוּ, וְהִכְבִּיד עָלָיו רֵעִים וְהִפְצִיר בּוֹ עַד שֶׁלְּקָחוֹ מִמֶּנּוּ, הֲרֵי זֶה עוֹבֵר בְּלֹא תַחְמֹד (שְׁמוֹת כ, יד‏) ‏




Something that you can buy, if you did made an act of acquisition, and the seller was initially opposed to the transaction.



what is added by the peratim here? --> buyable, mobile, which cannot be acquired against the will of the owner... but from other verses we learned that not each of a those criteria is exact.



All this is in the answer of @hazoriz in name of the Rabenu Bechaye. The text of the Mechilta illustrates how to reach the conclusions.


history - How old is the chanukiyah?


Another question asks about the differentiation between the words "chanukiyah" and "menorah" when referring to the special 8-branched (+1) candelabra for Chanukah. An answer there suggests:



All of the rest of their references to the Chanukah lights indeed use the term נר(ות) חנוכה. I'd guess that indeed the average person in those days didn't have a specially-designed candelabra for this purpose (or if they did, it wasn't branched like the original menorah)...




This seems plausible; I can't recall seeing older writings that refer to a special device, just references to lights. So my question is: How old is the chanukiyah, meaning a special candelabra that we use only for Chanukah and that has the correct number of wicks/candles? I'm interested in any evidence, whether from halachic literature, art, or known artifacts.



Answer



Neiros Shabbos - No 95 shows a picture of a Chanuka Menora from the 15th century in Sicily.


Jewish Art Museum of Minessota has 2 pictures of Menoras from the 13th century. One from Avignon and the other from Germany /Northern France.


According to this press release - The Living Torah Museum has the oldest known Chanuka Menora on display. I spoke to Rabbi Shaul Shimon Deutsch the owner of the museum. He said they did a test on this Chanuka Menora and they carbon dated and certified it from 60 years after the miracle of Chanuka in the 1st century!



During a recent archaeological excavation in Jerusalem, one of the workers uncovered an unusual artifact that was brought to the attention of the office of Antiquities. Crafted from hand pottery and small enough to be held in the palm of an adults hand, this ancient discovery has been determined to be what is known to be the world’s oldest recorded Hanukkah Menorah known to mankind since the establishment of the Hanukkah holiday. Accompanied by a certified letter of authenticity, issued by the Head of Antiquities, this Menorah has found it’s way through a private donor to a museum based in the Orthodox Jewish community of Boro Park, located in Brooklyn New York.



Tuesday, 29 December 2015

hashkafah philosophy - Astrology in the Torah



The Torah seems to have many examples where astrology is deemed real. (such as the astrology predictions that Moshe would be struck by water which made Paraoh throw the Jewish males in the Nile river. Or the midrash that says Avraham could see through astrology that he would not have children.)


What does Judaism say about the efficacy of astrology? Do Jews believe that astrology is real, or that it is just a bunch of coincidences?



Answer



Definitely it is real. See Masheches Shabbas 156: go through the whole gemara there, starting with where it says "Rabbi Yehoshua Ben Levi". It indicates that the day and time of someone's birth can affect him, though that there is a dispute as to whether Israel is affected by it.


midrash - How did Rivka get married when she was three years old?


What does the Medrash mean when it tells us that Rivka was three years old when she married Yitzchok? Is that meant in a literal sense? If so, how is this to be explained in a rational way?



Answer



The following I remember from a Sicha of the Lubavitcher Rebbe:


Rashi at the end of Parshas VaYeira feels the need to explain why the "news" Abraham received about his family tree is written right after the Akeidah (or at all) ? He answers by showing the Medrash which states that once Issac went through the Akeidah, (at age 37) he was ready to marry, so the Torah announces Rivkah's birth (she is on the list received by Abraham). Since we know Issac married when he was 40, therefore Rivkah is 3 years old at her marriage.


Tosfos to Yevamos 61b, brings an opposing Medrash which says she was married at age 14. (see Seder Olam Rabbah)


The Rebbe (and other scholars) are bothered by the fact that the Torah calls Rivkah a "naarah" when Eliezer meets her. A naarah in Torah language can only be an older girl above 12 years of age. Otherwise, the Torah would use the word "katanah" if she were really physically 3.



Based on this apparent contradiction, the Rebbe resolves it by saying the Seder Olam age of 14 is her physical age. The Medrash brought by Rashi, is not speaking physically, but spiritually. We know that Sarah passed away exactly at the time of the Akeidah. The Tanya explains that according to Kabbalah, a righteous person who dies, may sometimes be granted a mission to help a struggling living person in this world. The Tzadik/Tzadekes who passed has their soul reborn into the soul of their "student" on Earth, in order to help them overcome spiritual obstacles. This is called the secret of "Ibur Neshamah".


Sarah was reborn into the soul of Rivkah at the Akeidah (right after Sarah's passing). Therefore, the Medrash calls her a "three year old" at her wedding. That is, three years since she was born with Sarah's soul (which happened when she was physically 11).


Further proof that we are dealing with a living shared incarnation, is that Rivkah's arrival causes the return of Sarah's blessings (cloud, lights, dough). Issac is consoled "after his mother" and "brings her to his mother's tent" specifically. (Gen. 24:67)


In addition, I say that the "news" Abraham receives could not possibly have happened all at once. It is a long family tree with the report of many births over a long time. There is no reason to say Rivkah, who is on the list, was born exactly then (at the Akeidah when the news was sent) unless we are speaking of a spiritual birth.


So, Rivkah was 14 when she married Issac. She was 3 years old as a combined soul with Sarah.


The problem many people have with this IMHO, is that they only know the Rashi (not Tosfos and other meforshim) and take Rashi very literally on his use of a Medrash. But Medrashim were not usually meant to be used literally!


Therefore they find themselves stuck choosing between defending their faith (she was 3) and facing rational objection (how did she do the camel marathon...child marriage etc.)


The fact is, its just not a problem.


Yes, there were cases of ancients who were physically stronger and more mature at younger ages. The Gemara does show this to be the case. However, it does not seem to be so regarding Rivkah Imeinu.


product recommendation - Where can I get dark blue Techelet for my tzizit and talit?


I want to buy some techelet and white tzizit. I want the techelet to match the color in this picture and to be made by Ptil Tekhelet foundation. However, when I try to contact them on their website I get no response. (I've tried 3 times now)


ancient techelet


Does anyone know where in Northern Israel I can buy this, or a better way to contact the company?


Most improtantly, I want the techelet to be this color, and not the lighter blue that many people buy. Because this fabric is from Masada during the 1st centruy and to me, leaves all doubt as to what color techelet is supposed to be. (it hasn't changed color in 1900 years)



Answer



I was unable to ever get a hold of them. My best bet was to go to Jeruselem and buy them from the many stores there. I was able to find some dark threads, but none as dark as this picture.



signal analysis - Need a better step detection algorithm


I have a time series with lots of steps/jumps (data file here). A plot is given below. I would like to subtract an appropriate value for each of these square wave features to bring them back down to the baseline of the signal. A median filter works really well for removing a small number of outliers in a row, but in this case I probably need a different approach since the square wave jumps can have different durations as seen. A common method I've seen for doing this is to compute first differences of adjacent samples, and look for large differences to detect jumps. I implemented this method but the problem is it often fails, since the one tunable parameter for the method is a threshold value $t$ which the first differences must cross in order to detect a jump: $$ | x_{i+1} - x_i | > t $$ As can be seen in the plot below, the jumps I have are often different sizes, so a constant threshold value isn't the best approach. In particular, in some cases there is an interesting signal where adjacent samples can change by large values without being a jump! I have highlighted such a region in red.


Time series



Below is a zoomed in view of the red box area. You can see there is a square wave jump followed by an interesting signal. The red arrows depict a place where adjacent samples from an interesting signal have a larger distance between them than some of the jumps in the signal. Therefore a constant threshold method with finite differencing will not work for me.


Does anyone know of a robust procedure to detect and subtract the square wave jumps to end up with a smoothly varying signal with no jumps? I'm sure this must be a solved problem but I haven't had much luck searching online.


enter image description here



Answer



I managed to get a fairly reliable solution to this problem using the following steps:



  1. Smooth and differentiate the signal with a 2nd order Gaussian filter: $$ y(t) = \frac{d^2}{dt^2}G_{\sigma}(t) * x(t) $$

  2. Search for zero crossings in $y(t)$ and record their positions (a first derivative filter will show peaks at each edge/jump. A second order filter will have zero crossings at the positions of the edge/jump).

  3. Loop through the detected zero crossings $i$ (i.e. edge positions) and push the magnitude $|x_{i+1}-x_i|$ into a double-ended queue. I keep a cumulative sum of all elements in the queue extending backwards in time by some maximum amount (dt_max). If the next jump magnitude $|x_{i+1}-x_i|$ is within some relative error tolerance of the cumulative sum, the algorithm determines that a complete sequence of jumps has occurred leading back to the original signal baseline.

  4. When a complete jump sequence is found, offsets are calculated for each portion of the jump to bring all the segments down to the signal baseline. They are popped off the back of the double-ended queue as they are processed.



This procedure is not perfect, and still misses a few jumps, but manages to capture most of them, even in the presence of significant noise.


organic chemistry - IUPAC name of C₆(CH₃)₆²⁺


What is the correct IUPAC name (or least incorrect one, if the current rules can't precisely describe that) of the interesting species $\ce{[C6(CH3)6]^{2+}}$ (which is extensively discussed here), containing exotic hexacoordinate pyramidal carbocation* ?


The structure can be drawn as


structure formula


or


structure formula 2


My guess is methyl(pentamethyl-η5-cyclopentadienyl)carbon(2+).





*) Some structures in the Wikipedia article have the two positive charges placed into the cyclopentadienyl (aromatic) ring, which I think is incorrect.




particle が - が vs を in sentences of desire (-たい)


According to Genki, expressions of desire ( -たい sentences such as in the examples below) which use the particle を can also use the particle が interchangeably, and besides stating that, they give no further explanation. From what I could tell from searching around it seems that が appears to be a more natural choice (I could be wrong though). Does using を vs が imply a change in meaning? Is one particle preferred over the other in these types of sentences? Can they be used interchangeably 100% of the time or are there exceptions?


e.g. 映画が見たいです and 映画を見たいです, both of which should mean "I want to see a movie".




sources mekorot - Is eliyahu hanuvy real?


Is eliyahu hanuvy real? is he really coming by shfoch chamoschu or it's just the Jewish version of Santa Claus?




parshanut torah comment - How were Achiman, Sheshai and Talmai "Sons of Giants"?


In Bamidbar 13:22, the Torah tells us that the spies saw Achiman, Sheshai, and Talmai, the sons of Giants. Rashi tells us they were the descendants of Shamchazai and Azael, angels who fell from heaven in the days of Enosh.


The Gemara (Niddah 61A) tells us that Og was the grandson of Shamchazai.


The Rabbis tells us that Og survived the flood either by being on the roof of the Ark and being fed by Noach (Yonatan ben Uziel Bereshit 14:13) or standing next to the Ark where the waters were not boiling (Zevachim 113B).





  • Were Achiman, Sheshai, and Talmai born before the flood or after?




  • If they were born before the flood, and Og had to have a special method of being saved, how did Achiman, Sheshai, and Talmai survive?


    [The Gemara in Nidda (61A) says that Sichon was Og's brother, so we could ask how he was saved from the flood. Rabbi Bogomilsky brings a commentary from Rabbeinu B'Chaye (Seder HaDorot says it is Parshat Chukat), who says that "before entering the ark, the wife of Cham, Noach's youngest son, became pregnant with Sichon through a relationship with Schemchazel. Cham brought her into the ark together with him, and there she gave birth to Sichon. Consequently, Sichon and Og were brothers from the same father."]




  • If Achiman, Sheshai, and Talmai were born after the flood, how were they born of Shamchazai and Azael, who presumably died in or before the flood? were they descendants of Sichon or Og? If so, is it mentioned anywhere?





  • Did Shamchazai and Azael survive the flood and have more children? This doesn't seem likely, since (as we said) Og had to be saved. On the other hand, Og was 3/4th human (based on the Gemara that says he was the grandson of Shamchazai), while Shamchazai and Azael were angels, so maybe they were a special case.





Answer



In Yehoshua 14:15 Rashi, Radak, and Metzudas Dovid all say that the father of Achiman, Sheshai, and Talmai was Arba.


The Shaarei Aaron in Parshas Shelach Perek 13 Pasuk 33 mentions in the name of Reb Yeshaya and Rashi that they were descendants of Og since the Pasuk says "Vehu Nishar MiYeser HaRafaim". However, Rabbi Samson Refael Hirsch maintains that it is not necessarily so that they were descendants of Og. He mentions the Gemara in Zevachim 113 that there was no Mabul in Eretz Yisroel and says it is possible that they survived as they were in Eretz Yisroel.


Haamek Davar says that their father's name was Anak and that is why they were known as Bnei Anakim.


Monday, 28 December 2015

translation - Non conventional usage of the past tense


Why is the past tense used in this verbs (which doesn't make sense to me at least)



生きてい…?違うな…死ねなかったのだよ…!


再生機能を持っこのアーマーに押し込みおった



and the translation uses present tense




Survive? That's easy... Because I can't die!


And switched my body for this armor with the power to rejuvenate me



Does it make sense to use the past tense? or it's just how the character talks?



Answer



Finally I found an explanation that possibly answers at least your original question. This usage of "past tense" is called 発見の「た」 (ta for discovery) or ムードの「た」 (modal ta).


Most articles about this are written in Japanese, but here's an article written in English: Another Function of the Ta-form: Discovery and Recall


In a nutshell, my understanding is that た/だ, typically after ある/いる/ない, can sometimes express the nuance of "I've noticed ...", "I've just recalled ..." or "(In spite of one's prevoius knowledge/belief,) the fact is...". It actually refers to something in the present.





  • へえ、君はフランス語が読めんですね。
    Wow, you can read French! (although I have thought you can't)

  • (after looking for a wallet for a while) あっ、財布、こんなところにあっのか!
    Oh! There it is, my wallet!

  • そうでし、明日は休みでし。今思い出しました。
    Yeah, that is right, I have the day off tomorrow. I've just recalled that.

  • (after trying to open a door) おっと、鍵がかかって
    Oops, the door is locked.




As you can see, "fixing (or updating) one's previous knowledge/expectation" seems to be the key here. So saying 「お前、生きていたのか!」 is okay because he has believed the opponent in front of him is dead.


References (These are very long articles and I haven't read them all):



Related question:



coordination compounds - Inorganic chemistry reaction mechanisms


Are there well developed reaction mechanisms in inorganic chemistry like those in organic chemistry? If yes, please suggest an easy to follow reference.




halacha - Ose shalom post shemona esre


Basic Background:


Following the shemona esre prayer, the sages instituted concluding the prayer with the verse "yihyu leratzon" followed by "petira"- symbolically exiting from before G-d through taking 3 steps backward. There are other customs as well, such as additional supplications prior to "petira" and prayer for the rebuilding of the temple following "petira".


Directly following the "petira" we say a prayer "ose shalom bimromav", that G-d should grant us peace. While saying this prayer, it is customary to bow to either side and forward. My questions are:


Questions:




  1. Why is this prayer here? It seems to end other prayers as well such as kaddish and the harachamans following bentching. Is there a common thread?

  2. Why would we need to pray for peace here if we just ended the shemona esre with a blessing for peace?


Any history behind the institution of this prayer in general would be helpful as well.




tefilla - Why are Isaac and Rivka in Shochen Ad


Many siddurim capitalize the Yitzchak in Shochen Ad. Some draw attention to the Rivka. But why are either of them there? If you wanted to throw Yitzchak somewhere, why not minchah, which we midrashically derive from him.



bfi Ysharim titHalal

uvdivrei Tzadikim titBarach
uvilshon Chasidim titRomam
uv'kerev K'doshim titKadash


בְּפִי יְשָׁרִים תִּתְהַלָּל
וּבְדִבְרֵי צַדִּיקִים תִּתְבָּרַךְ
וּבִלְשׁוֹן חֲסִידִים תִּתְרוֹמָם
וּבְקֶרֶב קְדוֹשִׁים תִּתְקַדָּשׁ



PS. Sorry for the lack of Hebrew - I'm on my work computer and I could only find copyable chol davening. Feel free to edit / change to the Hebrew / add English.



Answer




Per Rabbi Aaron Gamliel in the Sefer Matei Aharon, the words Yitzchok & Rivka = Tefila (יצחק רבקה" בגימטריא "תפלה") and per the Raya Mehemna Zohar Chadash Vol 3, page 223:1 & page 253:1 the Shechina is also called Tefila since the whole purpose of Tefila is to connect to Hashem, like the name Naftali (נפתולי אלקים נפתלתי).


In Bereishis 25:21 it says ויעתר יצחק ל*נכח* אשתו כי עקרה היא


The word Nochach is Roshei Teivos נ'שמת כ'ל ח'י, and therefore in Nishmas Yitzchok & Rivka are standing opposite each other since the Posuk finishes that he was immediately answered - 'ויעתר לו ה.


The Avudram says that the name of the composer was Yitzchok and his wife's name was Rivka, and he made it in honor of Yitzchok Avinu and Rivka Imainu.


how to - How does an engaged person find a chosson/kallah (pre-marriage) class teacher?



How does an engaged person find a chosson/kallah (pre-marriage) class teacher? Preferably a good one?


Is it "just ask around"? Ask a rabbi? Is there any good way to compare different people, or is there just "the usual person"?



Answer



Might be worth trying yoatzot.org; I think they offer some teacher training so they might be able to recommend teachers. (While primarily for women, I wouldn't be surprised if they knew of male teachers too.)


I think Young Israel occasionally runs teacher training for its rebbetzins, but again, I'm not sure how many such teachers they are or where, or who to contact.


My impression is that depending on the size of the community and role the the rabbi/rebbetzin, sometimes they're the ones giving the classes, but in a larger community, or if the bride/groom doesn't currently have a clearly-defined synagogue rabbi, it becomes "somebody else's problem."


The OU says they're working on talking with rabbis and schools about improving pre-marital education, so we'll see if this changes soon.


physical chemistry - Supercritical fluids polarity


Water is a polar solvent, but in the supercritical fluid state, it is much less polar, I presume because of the cleavage of hydrogen bonds. On the other hand, carbon dioxide is non-polar, but as a supercritical fluid it is more polar. Why is this so?




frequency spectrum - Why does spectral leakage arise in an FFT?


I've tried googling and wikipedia-ing it, but I haven't gotten any answers beyond 'it's because the frequency of the input signal is sitting between two bins'.


I understand that this is the reason, but what I can't understand is why the leakage seems to extend to several adjacent bins rather than only one adjacent bin.



To illustrate what I'm talking about, here's some simulated data (code at the end of the post) : Freq_10


Above is the FFT spectrum (plotted on a log scale) of a sine wave of frequency 10. The sampling rate is one, and the number of samples is 100. The graph has been FFT-shifted. There's clearly only a peak at bin 10, and the rest is on the order of numerical error, or there about.


Freq_10_1


This is the frequency spectrum at a generated frequency of 10.1. Clearly there is 'leakage' into more bins than just the immediately adjacent bin.


freq_10_5


This is the plot for a frequency of 10.5.


Question: Why is there this leakage, and why does it extend to all the other bins, rather than the immediate adjacent bin?




Code, for anyone who's interested (Python code)


import numpy as np

import matplotlib.pyplot as plt

xFreq = 10.5
xSize = 100.0
xPeriod = xSize/xFreq
x = np.linspace(1,xSize,xSize)

data = np.sin(2*np.pi*x/xPeriod)
fft = np.fft.fft(data)
fft = np.fft.fftshift(fft)


fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(abs(fft), "o")
ax.set_yscale('log')
plt.show()

I changed the xFreq value from 10.0 to 10.5, etc.



Answer



An FFT has finite length, and thus constitutes a default rectangular window on a data stream. A window in the time domain results in a convolution in the frequency domain with the transform of the window. Note that the transform of a rectangular window is a Sinc function (sin(x)/x), which has infinite width. It's not just 2 bins in width. Thus the ripples of the Sinc function will show up as "leakage" far from any spectral peak that is not perfectly periodic in the FFT's length.



The picture below shows part of the frequency response of the sinc function. When the tone is centered on one of the bins all of the other points are lined up with the nulls in the frequency response. If it isn't centered on a bin then it's like shifting the whole frequency response, which causes the other bins to fall on non-null portions of the frequency respoonse.


enter image description here


Another way to look at it is that an FFT is just a filter bank, where each filter stop-band floor has lots of ripples, and is certainly not infinite in attenuation more than 1 bin away from center frequency. Some windows (von Hann,etc.) other than rectangular have lower stop bands, which is one reason for their popular use.


grammar - Questions about comparatives


I have two questions that I think are quite related regarding the interpretation of comparatives.


1. Is it necessary to include a より or a 方 expression to convey a comparative?


Suppose you are having a conversation about how the book you just read was too long. You are then asked what you want to do later. You respond:



昨日読んだ本より短いのが買いたい。


I want to buy a shorter book than the one I read yesterday.
(Please bear in mind that I constructed the Japanese sentence above, so it could be wrong in any number of ways. I'd appreciate a correction if required.)




My question is, if you responded with simply:



短い本が買いたい。



would it be interpreted as implying "shorter" (where "shorter" is drawing a comparison to the book previously mentioned in context), or "short" (where "short" is not explicitly compared to anything), or perhaps it is unclear?


Furthermore, is there an alternate way to express the comparison without explicitly stating 「昨日読んだ本」?


2. Do なる expressions imply comparison or must it be explicitly stated?


I'd like to compare the following English sentences:






  1. The road became wide.




  2. The road became wider.





Sentence 1 states that something changed and now the road is wide (as opposed to narrow). Sentence 2 states that something changed and now the road is wider than it used to be. It does not actually state that the road is wide.


As far as I know, both of these sentences would be translated to:




道が広くなった



Is my translation correct for both cases and if so, how could it be altered to differentiate between the two English meanings?



Answer




"Is it necessary to include a より or a 方{ほう} expression to convey a comparative?"



In many cases, yes, but certainly not in all cases.


The key factor here is whether or not the comparison is made against a concrete example as the standard. That is to say, one needs to consider whether the comparison is absolute or relative. In other words, is it objective or subjective?




「昨日読{きのうよ}んだ本{ほん}より短{みじか}いのが買{か}いたい。」



In this sentence, the comparison being made is basically objective. Why so? Because the speaker knows exactly how long the book he read yesterday was. Today, he wants to buy a shorter one.


(For those wondering, the use of 「が」 there is completely natural.)



「短い本が買いたい。」 ("I want to buy a short book.")



This sentence, when uttered all by itself, can only mean "I want to buy a short book." It does not mean "I want to buy a shorter book."


There is, however, an easy way to express "a shorter book" without comparing it to another actually existing book. In other words, the book only needs to be "kind of short" by the speaker's own standards. That phrase would be:




「短の本が買いたい。」 ("I want to buy a shorter book.")



How short is 短め, only the speaker knows because that is a subjective judgement. Important thing is that the sentence makes perfect sense to the speaker while it might sound ambiguous to some others.



"Do なる expressions imply comparison or must it be explicitly stated?"



Great question. They do generally imply comparison. Otherwise, what is the use of our magic verb 「なる」, which is used to express "change of state"? You cannot talk about "change" without making some kind of comparison, can you?



「道{みち}が広{ひろ}くなった。」




undoubtedly means "The road became wider (than it was at an unmentioned time)." You simply cannot say that sentence if the road width has not changed. Using 「なる」 means there has been a change.


You could say:



「以前{いぜん}より道が広くなった。」



to state the standard of comparison by adding "than before", but the point of the matter is that "than before" is already implied in the sentence without 「以前より」.


inorganic chemistry - Why does stannous chloride occur despite the octet rule?


Shouldn't reaching an octet be any atom's "goal"?


However, I've recently learned about cases that are either expanding octets, or have lesser than "enough" electrons for an octet abiding. e.g.:


S in sulfur hexafluoride (Expanding octet into $\text{3d}$)


enter image description here


Source


B in boron trifluoride (It's "hextet", instead of octet)



enter image description here


Source


However, both $\ce{SnCl2}$ and $\ce{SnCl4}$ are existent. The latter is explainable with octet, but not the former. Surprisingly, $\ce{SnCl2}$ is more stable!



  1. How?

  2. Why is the phenomenon happening?




Dave pointed out that the octet nonabidingness is happening in the vapor phase. So I redirect the question to ask about the vapor phase; since that's what I'm looking for.



Answer




$\ce{SF6}$ does not expand it octet by way of using 3d orbitals. It is often taught that way, particularly in introductory classes. A better description involves treating it as a hypercoordinated molecule. See these earlier answers for an explanation of how hypercoordination can be applied. When finished you should be able to apply the concept to $\ce{SF6}$.



$\ce{BF3}$ is electron deficient and reacts rapidly with molecules containing lone pairs of electrons (amines, oxygen containing compounds, etc.) to stabilize the octet configuration. It has also been observed that the $\ce{B-F}$ bond length is somewhat shorter than expected. This has been explained by invoking resonance structures such as


enter image description here


and


enter image description here


To whatever degree these types of resonance structures contribute to the true description of $\ce{BF3}$ they help explain the shortened bond length and also achieve an octet around the central boron.


A similar explanation can be applied to $\ce{SnCl2}$, drawing a resonance structure with a $\ce{Sn=Cl}$ double bond creates an octet around the central tin atom. To whatever degree such resonance structures contribute to the real description of $\ce{SnCl2}$, they will help satisfy the octet electronic configuration around the central tin atom.


dictionary - What is the order of the full list of kana?


My question would be, if I were to pick up a Japanese dictionary, or had a project in which I needed to put several Japanese words (including hiragana, katakana, and kanji, with gojūon, dakuon, yōon, sakuon and the digraphs) in order, what would be the correct "alphabetical" order? I understand some of it, such as the fact that they all need to be read according to the gojūon order (a ka sa ta...) in hiragana form, and the smaller forms of kana come after the original forms.


I looked everywhere online and was unable to find a full list or explanation to this, I only found the separate tables for kana, which only confused me more.


I am only a beginner to learning the language, and every little helps me to understand it and the culture better!




halacha - What's the Bishul Akum heter for hard-boiled eggs?



I've seen prepackaged hard-boiled eggs in the grocery store with an OU. As eggs are relatively inedible raw, what is the heter vis-a-vis bishul akum for them? (Or are they having a Jewish mashgiach turn on the equipment in the factory?) Would we say they're not fit for a state banquet?



Answer



This is the response I received to my query from the OU.



Dear Gershon, Thank you for contacting the OU. They are bishul yisroel. Please do not hesitate to contact us again should you have any further questions. Sincerely, The Web(be) Rebbe Orthodox Union Kashruth Division



So there is no Bishul Akum Heter being used with supervised hard boiled eggs.


halacha - Repeating words in prayer


If I have a lapse in concentration during a few words in davening, it improves my davening tremendously to be able to go back and force myself to immediately say those words again, properly. I find that it helps me concentrate the first time too. Can repeating like this ever be allowed?



  • Obviously once a brocha is said one should not go back. I assume repeating a Shem Hashem would similarly be a problem.


  • Regarding Shema - I recall that repeating the פסוק of שמע ישראל is definitely a problem, and repeating paragraphs is okay.

  • Regarding Hallel - I recall repeating words being a problem.



Answer



From dinonline.org



It is permitted to repeat words of davening for added intent in prayer. However, there is a virtue of having full intent the first time, and not repeating words. One can certainly say the word, and then reflect on its meaning, without saying it again.


Sources:


The Mishnah (Berachos 33b) writes that one who says “modim, modim” is silenced by the congregation. The reason for this is suspected heresy.


The implication is that only one who repeats the word modim is silenced, and not others.



Furthermore, Rav Nissim Gaon and Tosafos quote from the Yerushalmi (Berachos 5:3) that the ruling applies only to the chazzan, and not for somebody who repeats the word in his private prayer, where it is considered a form of increased supplication. Some commentaries write that this distinction will not apply to the word modim itself. Yet, the Tur (Orach Chaim 61) notes that the distinction is not found in the Bavli, and therefore rejects it from halachah. The Bach, however, rules that the distinction of the Yerushalmi is valid.


However, even where there is no concern for heresy, it emerges from the Gemara and Rashi that a chazan must not repeat words, for this is disrespectful to the davening (see Rashi).


Several poskim thus write against the practice of chazanim repeating words of the davening just for the sake of the tune (see Aruch Hashulchan 338:8; Shemesh Marpeh Orach Chaim 4; Iggros Moshe, Orach Chaim 2:22; among others).


However, this problem applies when there is no good reason to repeat the words. If a person said words without proper intent, and he wishes to repeat them with proper intent, it is permitted to repeat words of davening (see Iggros Moshe, loc. cit.; Or Le-Zion 7:39; Hillel Omer 192; Pekudas Elazar, Orach Chaim 25; Eishel Avraham, end of Orach Chaim 51).


Yet, some authorities raise the issue of a hefsek, and mention that even for an individual it is disrespectful to repeat words. The Maharam Schick (Orach Chaim 31) thus writes against the practice of repeating words even for an individual (see also Yabia Omer Vol. 6, Orach Chaim 7:4).


There is therefore a virtue of having proper and full intent the first time, and not repeating words.



Understanding Voss-McCartney pink noise generation algorithm


I'm implementing the Voss-McCartney pink noise generation algorithm.


If you follow the link above, you can read:




from James McCartney 2 Sep 1999 21:00:30 -0600:



The top end of the spectrum wasn't as good. The cascade of sin(x)/x shapes that I predicted in my other post was quite obvious. Ripple was only about 2dB up to Fs/8 and 4dB up to Fs/5. The response was about 5dB down at Fs/4 (one of the sin(x)/x nulls), and there was a deep null at Fs/2. (These figures are a bit rough. More averaging would have helped.)



You can improve the top octave somewhat by adding a white noise generator at the same amplitude as the others. Which fills in the diagram as follows:


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x x x x x x x x x x x x x x x x
x x x x x x x x
x x x x
x x

x

It'll still be bumpy up there, but the nulls won't be as deep.



If I understand it well, this algorithm generates pink noise by adding random (white?) noise sources at different frequencies1


However, I don't fully understand the explanation given in the quote above for the extra white noise generator on the "top row". Can someone clarify how/why it improves the algorithm? Does that make it a good algorithm for pink noise generation for audio applications? Especially, shouldn't I discard the first samples until all the "rows" were mixed into the signal (in the ASCII art quoted above, that would mean discarding 15 first samples)?




1 I'm not sure of the wording here. Do not hesitate to correct me if I'm wrong



Answer



So let's look at what the author of the article you linked to says further down; Output samples are on the top row, and are the sum of all the other rows at that time.




Output  /---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\
\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/

Row -1 /---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\/---\
\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/\___/

Row 0 /--------\/--------\/--------\/--------\/--------\/--------\/--------\/--------\/--------\
\________/\________/\________/\________/\________/\________/\________/\________/\________/


Row 1 --------------\/------------------\/------------------\/------------------\/--------------
______________/\__________________/\__________________/\__________________/\______________

Row 2 ------------------------\/--------------------------------------\/------------------------
________________________/\______________________________________/\________________________

Row 3 --------------------------------------------\/--------------------------------------------
____________________________________________/\____________________________________________

Row 4 ------------------------------------------------------------------------------------\/----

____________________________________________________________________________________/\____

This means that the above diagram has multiple different white sequences, which they only occasionally change – let's formalize that. Start with only the two top rows:



  • Row -1 is simply white noise

  • Row 0 is white noise, interpolated by a factor of 2 with a 2-sample-boxcar-filter / sample-and-hold. That gives that noise an (aliased) sinc shape, which is essentially a low-pass shape


Row 1…N do the same, with the sincs becomming narrower by factors of 2.


Thinking about the discrete PSD of this:




  • Row -1 has a constant discrete PSD

  • Row 0 adds sinc(2f)²-shaped power to that

  • Row 1 adds sinc(4f)²-shaped power to that

  • and so on


All in all, I don't have a proof that this becomes perfectly pink at hand, it probably doesn't within finite observation, but it's kind of intuitive to think that close to 0 Hz, all the main lobes of these sinc²s add up, and with every doubling of frequency, you get closer to the zeros of more sinc²s.


The proposed algorithm really doesn't seem so elegant – generating good (discrete) white (pseuderandom) noise is actually surprisingly hard for longer observational windows (which is what you need if you want to assess the quality of something), and hence, having a pseudorandom generator¹ run at asymptotically twice the sampling rate seems more effort then letting it run at the sampling rate and then using an appropriate low-pass filter that approximates the desired spectral shape (in this case, $\lvert H(f)\rvert \propto \frac1f$); at least on modern CPUs, which have excellent SIMD instructions (i.e. highly optimized for running filters, not so much for running pseudo-random noise generators), the difference between holding and adding up many noise values and doing a FIR is that the FIR requires multiplication of held values with constants (the filter taps) – and since that can typically done in a fused multiply-accumulate operation.


Now, on an ASIC or FPGA, things might look different; if the amplitude distribution of the noise doesn't matter (i.e. there's no need to add up anything but uniformly drawn, uncorrelated samples), then you can actually save on complexity by doing the "simpler" thing, i.e. logical operations needed to generate e.g. XOROSHIRO128** would very likely be clocked much higher than the multipliers needed for a nice FIR filter.




¹you don't need multiple generators – you just ask that one white one more often; white samples are uncorrelated in every subsampling!

Sunday, 27 December 2015

rashi - Why Avraham hated Yishmael if he was a tzadik


Rashi says that avraham sent yishmael out with only water but no money because he hated him for going out "tarbut raah". yet later on, the verse says G-d heard the cry of Yishmael dying of thirst "baasher hu sham", that the angels wanted to let him die due to the future suffering his descendants will cause the jews but G-d said right now he is a tzadik.


sounds like a contradiction. any ideas?




minhag - My family uses tomatoes for karpas, is there a mekor for using tomatoes for karpas?


My family minhag is to use tomatoes for karpas, what is the mekor for this and do any of you guys on miyodeya use tomatoes for karpas as well.




Answer



The karpas must have the bracha of ha'adamah, and indeed, over tomatoes you recite the bracha of borei pri ha'adamah. I have never used tomatoes myself, but I've heard of the custom. It's fine.


I use a boiled potato for the karpas; but it has to be boiled because raw potatoes are for one thing bad for your health but also they do not have the bracha of ha'adamah. Potatoes and onions are shehakol unless they've been cooked.


halacha - Can't use the name of Gd during spontaneous prayer?


What is the rationale in suggesting that a person who wishes to pray to Hashem outside the context of formal communal prayer, that they may not use Gd's name in doing so?


This seems to me to go against most of the examples of prayer we find in Tanach and the Talmud, as well as Chasidic custom.





Inspired by this question.




computational chemistry - What's the difference between PBE and B3LYP methods?


I can't find an answer to that question. I was told that in B3LYP, more variables implemented in the method are empirical, but I can't find anywhere if it's true, and I'm sure it's not the only difference. I'm new to calculations, and it seems so hard and confusing, so please help me.



Answer



PBE


The PBE functional${}^{[1]}$ belongs to the class of generalized gradient approximation (GGA) functionals for the exchange-correlation energy $E_{\mathrm{xc}}$. Considering that the dependence $E_{\mathrm{xc}}[\rho]$ may be non-local, i.e. $E_{\mathrm{xc}}$ may depend on the density $\rho$ at a given point (locality), but also on $\rho$ nearby (non-locality) the assumption made by the local spin density approximation${}^{[2,3]}$ (LSDA) that $E_{\mathrm{xc}}[\rho]$ is strictly local leaves a lot room for improvement. But still LSDA is a good starting point since it is a rather simple efficient model that gives good results. The GGA functionals improve on LSDA in a way that's pretty much in the spirit of a Taylor series with LSDA as a starting point: When we are at a point, what happens further off depends not only on $\rho$ at that point, but also the gradient of $\rho$ at the point, etc. (much as in a Taylor series: if you want to go further you may need not only the gradient, but also the Laplacian, etc.). So, these functionals are typically constructed by adding gradient corrections to the LSDA functionals. But that is not a trivial thing to do and doing it "naively" leads to wrong results. Therefore, some GGA functionals are parametrized by fitting experimental data. But there are also some GGA functionals that achieve the inclusion of gradient correction without introducing experimentally fitted parameters which makes them valid for a wide range of systems. One example of such a parameter-free GGA functional is the one developped by Perdew, Burke and Ernzerhof (PBE). It is known for its general applicability and gives rather accurate results for a wide range of systems.


Side note: GGA functionals are frequently termed non-local functionals in the literature. This is a somewhat misleading and actually sloppy terminology that should be avoided and since my above statements might be misread in that direction I want to make one thing perfectly clear: All GGA functionals are perfectly local in the mathematical sense: the value of the functional at a point $\vec{r}$ depends only on information about the density $\rho(\vec{r})$, its gradient $\nabla\rho(\vec{r})$, and possibly other information at this very point and is absolutely independent of properties of $\rho(\vec{r}^{\, \prime})$ at points $\vec{r}^{\, \prime} \neq \vec{r}$. Calling these functionals 'non-local' is only motivated by the fact that these functionals go beyond the 'local' density approximation and of course the observation that knowledge of the gradients is the first step towards accounting for the inhomogeneity of the real density.


B3LYP


The B3LYP approach${}^{[4,5,6]}$ belongs to the hybrid approximations for the exchange–hybrid correlation functional. The approximation is famous, because it gives very good results and, therefore, is extremely popular. The distinguishing feature of such hybrid approximations is that they mix in a certain amount of the exact Hartree–Fock exchange energy into the exchange and correlation obtained from other functionals. There is actually some justification for that: At the lower limit ($\lambda = 0$, where $\lambda$ is the coupling constant) of the so called coupling constant integration the exchange-correlation hole is equal to the exact exchange hole. This observation led Becke${}^{[7, 8]}$ to conclude that a fraction of exact exchange should be mixed with GGA exchange and correlation. The simplest such hybrid functional is



\begin{align} E^{\mathrm{hyb}}_{\mathrm{xc}} = a E_{\mathrm{x}}^{\mathrm{exact}} + (1 − a) E^{\mathrm{GGA}}_{\mathrm{x}} + E^{\mathrm{GGA}}_{\mathrm{c}} \end{align}


where the constant $a$ can be fitted empirically or estimated theoretically ${}^{[9, 10, 11]}$ as $a \approx \frac{1}{4}$ for molecules. So far so good, but it smells like a witch's brew for the B3LYP exchange–correlation potential $E_{\mathrm{xc}}$: take the exchange–correlation energy from the LSDA method, add a pinch (20%) of the difference between the Hartree–Fock exchange energy $E^{\mathrm{KS}}_{\mathrm{x}}$ (well, in fact, this is Kohn–Sham exchange energy, because the Slater determinant wave function, used to calculate it, is the Kohn–Sham determinant, not the Hartree–Fock one) and the LSDA $E^{\mathrm{LSDA}}_{\mathrm{x}}$. Then, mix well 72% of Becke exchange potential${}^{[12]}$ $E^{\mathrm{B88}}_{\mathrm{x}}$ which includes the 1988 correction, then strew in 81% of the Lee–Yang–Parr correlation potential${}^{[13]}$ $E^{\mathrm{LYP}}_{\mathrm{c}}$. You will like this homeopathic magic potion most if you conclude by putting in 19% of the Vosko–Wilk–Nusair potential$^{[14]}$ $E^{\mathrm{VWN}}_{\mathrm{c}}$:


\begin{align} E^{\mathrm{B3LYP}}_{\mathrm{xc}} = E^{\mathrm{LSDA}}_{\mathrm{xc}} + 0.2 (E^{\mathrm{KS}}_{\mathrm{x}} - E^{\mathrm{LSDA}}_{\mathrm{x}}) + 0.72 E^{\mathrm{B88}}_{\mathrm{x}} + 0.81 E^{\mathrm{LYP}}_{\mathrm{c}} + 0.19 E^{\mathrm{VWN}}_{\mathrm{c}} \end{align}


So, you can see B3LYP contains lots of empirical parameters but that's fine as long as you only want the results and don't want to know why this is working :)


References


${}^{1}$ J. P. Perdew, K. Burke, M. Ernzerhof, "Generalized Gradient Approximation Made Simple", Phys. Rev. Lett. 1996, 77, 3865; J. P. Perdew, K. Burke, M. Ernzerhof, "Erratum to Generalized Gradient Approximation Made Simple", Phys. Rev. Lett. 1997, 78, 1396 (E). (Link)


${}^{2}$ W. Kohn, L. J. Sham, Phys. Rev. 1965, 140, A1133. (Link)


${}^{3}$ U. von Barth, L. Hedin, "A local exchange-correlation potential for the spin polarized case", J. Phys. C: Solid State Phys. 1972, 5, 1629–1642. (Link)


${}^{4}$ A. D. Becke, "Density-functional thermochemistry. III. The role of exact exchange", J. Chem. Phys. 1993, 98, 5648-5652. (Link)


${}^{5}$ P. J. Stephens, F. J. Devlin, C. F. Chabalowski, M. J. Frisch, "Ab Initio Calculation of Vibrational Absorption and Circular Dichroism Spectra Using Density Functional Force Fields", J. Phys. Chem. 1994, 98, 11623–11627. (Link)



${}^{6}$ K. Kim, K. D. Jordan, "Comparison of Density Functional and MP2 Calculations on the Water Monomer and Dimer", J. Phys. Chem. 1994, 98, 10089–10094. (Link)


${}^{7}$ A. D. Becke, "A new mixing of Hartree–Fock and local density‐functional theories ", J. Chem. Phys., 1993, 98, 1372. (Link)


${}^{8}$ A. D. Becke, "Density‐functional thermochemistry. III. The role of exact exchange", J. Chem. Phys., 1993, 98, 5648. (Link)


${}^{9}$ J. P. Perdew, M. Ernzerhof, and K. Burke, "Rationale for mixing exact exchange with density functional approximations", J. Chem. Phys., 1996 105, 9982. (Link)


${}^{10}$ C. Adamo and V. Barone, "Toward reliable density functional methods without adjustable parameters: The PBE0 model", J. Chem. Phys., 1999 110, 6158. (Link)


${}^{11}$ M. Ernzerhof and G. E. Scuseria, "Assessment of the Perdew–Burke–Ernzerhof exchange-correlation functional", J. Chem. Phys., 1999, 110, 5029. (Link)


${}^{12}$ A. D. Becke. "Density-functional exchange-energy approximation with correct asymptotic behaviour", Phys. Rev. A 1988, 38, 3098-3100. (Link)


${}^{13}$ C. Lee, W. Yang, R. G. Parr, "Development of the Colle-Salvetti correlation-energy formula into a functional of the electron density", Phys. Rev. B, 1988, 37, 785-789. (Link)


$^{14}$ S. Vosko, L. Wilk, M. Nusair, "Accurate spin-dependent electron-liquid correlation energies for local spin density calculations: a critical analysis", Can. J. Phys. 1980, 58, 1200-1211. (Link)


readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...