<commit_before>\documentclass[letterpaper,12pt,preprint]{aastex}

% packages
\usepackage{amssymb,amsmath, amsbsy}

% commands
\newcommand{\given}{\,|\,}
\newcommand{\dd}{\mathrm{d}}
\newcommand{\transpose}[1]{{#1}^{\mathsf{T}}}
\newcommand{\inverse}[1]{{#1}^{-1}}

% bold X and D
\newcommand{\D}{{\bf D}}
\newcommand{\W}{{\bf W}}
\newcommand{\X}{{\bf X}}
\newcommand{\V}{{\bf V}}
\newcommand{\bSigma}{{\bf \Sigma}}
\newcommand{\bsigma}{\boldsymbol\sigma}

\begin{document}

\title{Back-integration likelihood}
\author{<NAME>}

Take ${\bf D}$ to be the observed, heliocentric 6D position of a star --- e.g., the measured position on the sky, ($l$, $b$); distance, $D$; proper motions, ($\mu_l$, $\mu_b$); and line-of-sight velocity, $v_r$ --- and take ${\bf W}$ to be the corresponding \emph{true}, 6D position of the same star in the same coordinate and reference frame. We have determined that this star was once part of a progenitor system (e.g., satellite galaxy) that is tidally disrupting and forming a cold debris structure in the potential, $\Phi$, of some parent galaxy. The position of the satellite is observed to be at heliocentric 6D position ${\bf D}_s$, with true position ${\bf W}_s$, where the subscript $s$ refers to the satellite. The true, 6D spherical, heliocentric positions of the star and satellite -- $\W$ and $\W_s$ -- have corresponding 6D cartesian, Galactocentric coordinate vectors $\X$ and $\X_s$. 

We model the present-day position and velocity of the disrupted star as the result of sampling from isotropic, log-normal distributions centered on the tidal radius, $R_{\rm tide}$, and escape velocity, $V_{\rm esc}$ of the satellite, respectively, at some time $\tau$ in the past, evolved to present day in the parent potential, $\Phi$. In this model, we neglect the effect of self-interaction with the halo of the progenitor [TODO: maybe we need to justify this, add APW's figure from paper 1 ref. response?].

With these assumptions we can write the joint posterior probability for the observed position of a star, properties of the disrupting satellite, and parent potential given the data as:
\begin{align}
	%p(\Phi, \W^{(i)}, \W_s, \V_s, \tau^{(i)} \given \D^{(i)}, \D_s) &= 
	%	\frac{1}{\mathcal{Z}} p(\D^{(i)} \given \W^{(i)}) p(\D_s \given \W_s) p(\W^{(i)} \given \W_s, \V_s, \tau^{(i)}, \Phi)
	p(\Phi, \W^{(i)}, \W_s, \V_s, \tau^{(i)} \given \D^{(i)}, \D_s) &= 
		\frac{1}{\mathcal{Z}} p(\D^{(i)} \given \W^{(i)}) p(\D_s \given \W_s) p(\D^{(i)} \given \D_s, \V_s, \tau^{(i)}, \Phi)
\end{align}
where the factor $\mathcal{Z}$ only depends on the properties of the data (the \emph{evidence}), and is thus constant when varying the model parameters. We assume that the observational errors are Gaussian:
\begin{align}
	p(\D^{(i)} \given \W^{(i)}) &= \mathcal{N}(\W^{(i)} \given \D^{(i)}, \bSigma^{(i)})\\
	p(\D_s \given \W_s) &= \mathcal{N}(\W_s \given \D_s, \bSigma_s)<commit_msg>some paper notes<commit_after>\documentclass[letterpaper,12pt,preprint]{aastex}

% packages
\usepackage{amssymb,amsmath, amsbsy}

% commands
\newcommand{\given}{\,|\,}
\newcommand{\dd}{\mathrm{d}}
\newcommand{\transpose}[1]{{#1}^{\mathsf{T}}}
\newcommand{\inverse}[1]{{#1}^{-1}}

% bold X and D
\newcommand{\D}{{\bf D}}
\newcommand{\W}{{\bf W}}
\newcommand{\X}{{\bf X}}
\newcommand{\V}{{\bf V}}
\newcommand{\bSigma}{{\bf \Sigma}}
\newcommand{\bsigma}{\boldsymbol\sigma}

\begin{document}

\title{Back-integration likelihood}
\author{<NAME>}

Take ${\bf D}$ to be the observed, heliocentric 6D position of a star --- e.g., the measured position on the sky, ($l$, $b$); distance, $D$; proper motions, ($\mu_l$, $\mu_b$); and line-of-sight velocity, $v_r$ --- and take ${\bf W}$ to be the corresponding \emph{true}, 6D position of the same star in the same coordinate and reference frame. We have determined that this star was once part of a progenitor system (e.g., satellite galaxy) that is tidally disrupting and forming a cold debris structure in the potential, $\Phi$, of some parent galaxy. The position of the satellite is observed to be at heliocentric 6D position ${\bf D}_s$, with true position ${\bf W}_s$, where the subscript $s$ refers to the satellite. The true, 6D spherical, heliocentric positions of the star and satellite -- $\W$ and $\W_s$ -- have corresponding 6D cartesian, Galactocentric coordinate vectors $\X$ and $\X_s$. 

We model the present-day position and velocity of the disrupted star as the result of sampling from isotropic, log-normal distributions centered on the tidal radius, $R_{\rm tide}$, and escape velocity, $V_{\rm esc}$, of the satellite, respectively, at some time $\tau$ in the past, evolved to present day in the parent potential, $\Phi$. In this model, we neglect the effect of self-interaction with the halo of the progenitor [TODO: maybe we need to justify this, add APW's figure from paper 1 ref. response?].

With these assumptions we can write the joint posterior probability for the observed position of a star, properties of the disrupting satellite, and parent potential given the data as:
\begin{align}
	%p(\Phi, \W^{(i)}, \W_s, \V_s, \tau^{(i)} \given \D^{(i)}, \D_s) &= 
	%	\frac{1}{\mathcal{Z}} p(\D^{(i)} \given \W^{(i)}) p(\D_s \given \W_s) p(\W^{(i)} \given \W_s, \V_s, \tau^{(i)}, \Phi)
	p(\Phi, \W^{(i)}, \W_s, \V_s, \tau^{(i)} \given \D^{(i)}, \D_s) &= 
		\frac{1}{\mathcal{Z}} p(\D^{(i)} \given \W^{(i)}) p(\D_s \given \W_s) p(\D^{(i)} \given \D_s, \V_s, \tau^{(i)}, \Phi)
\end{align}
where the factor $\mathcal{Z}$ only depends on the properties of the data (the \emph{evidence}), and is thus constant when varying the model parameters. We assume that the observational errors are Gaussian:
\begin{align}
	p(\D^{(i)} \given \W^{(i)}) &= \mathcal{N}(\W^{(i)} \given \D^{(i)}, \bSigma^{(i)})\\
	p(\D_s \given \W_s) &= \mathcal{N}(\W_s \given \D_s, \bSigma_s)
{'fraction_non_alphanumeric': 0.17928082191780823, 'fraction_numerical': 0.005136986301369863, 'mean_word_length': 4.324521422060164, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6422217', 'n_tokens_mistral': 1963, 'n_tokens_neox': 1845, 'n_words': 739}