In this study, the following has been carried out:
1.-A FLOWS simulation
2.-A study of how the number of data in the NIR and their epochs affect the information provided by the SNe Ia.
3.-Determination of the epoch with the lowest dispersion of the mean light curve of the sample.
4.-Fitting the Hubble constant assuming fixed M_J, and \Omega_M for three different models.
5.-Formulation of their corresponding Hubble diagrams.
The first three points are in the Python code flows.ipynb and the last two in MCMC.ipynb.
To get flows.ipynb working, it needs to be started using the SNooPY light curve analysis package. The code is divided into four sections:
-First are the functions necessary for it to work.
-Then there is the code for the simulations, which also contains the file generators for the mean light curve and the Hubble diagram.
-The codes with which the data obtained in the previous section have been analysed, generating their respective plots.
-Finally, a miscellaneous section where other illustrative graphs are made for the memory.
For flows.ipynb to work, the text files of the 'TFG-sims/fotometrías' folder must be saved in the same folder where it is located. In addition, it is necessary to previously generate three folders called 'resultados', 'Fit' and 'txt2'.
If you want to use the #ALEATORIOS# section, you also need to create a folder called 'txt', but it is better to use #COMBINATORIA# instead.
If you want to process directly the results obtained without performing the simulations, you will have to paste the files in the folder 'TFG-sims/resultados' and 'TFG-sims/referencias' folder in the 'resultados' folder.
To get MCMC.ipynb working you need to initialise it with Python3 and have the emcee and corner packages, among others. The code is divided into three sections:
-First we show a previous code that treats H_0 and M_J as independent variables to be adjusted, as you can see the results are not acceptable.
-Next, we show the definite code of the adjustment. In this code H_0(M_J) is fitted, the code generates the corner plots with the results and the evolution of the parameters for each of the parameters and the evolution of the parameters for each repetition.
-The last section generates the Hubble diagrams and calculates the value of the Hubble constant with its (statistical) error.
For the operation of MCMC.ipynb it is necessary to have the text files of the folder 'TFG-sims/resultados' with the name 'Hubble' in a folder called 'resultados'. These data files are generated by flows.ipynb.
In the folder 'TFG-sims/gráficas' are all the figures generated during the analysis of the simulation data, mean light curve and Hubble diagram.
En este estudio se ha realizado:
1.-Una simulación de FLOWS
2.-Un esudio de como afecta el número de datos en el NIR y sus épocas a la información proporcionada por las SNe Ia
3.-Determinación de la época con menor dispersión de la curva de luz media de la muestra
4.-Ajuste de la constante de Hubble suponiendo M_J, y \Omega_M fijos para tres modelos distintos
5.-Realización de sus correspondientes Diagramas de Hubble
Los tres primeros puntos se encuentran en el código de Python flows.ipynb y los dos últimos en MCMC.ipynb
Para hacer funcionar flows.ipynb es necesario iniciarlo utilizando el paquete de análisis de curva de luz SNooPY. El codigo está dividio en cuatro secciones:
-En primer lugar están las funciones necesarias para su funcionamiento.
-Posteriomente el código de las simulaciones, donde además se encuentran los generadores de archivos para la curva de luz media y el diagrama de Hubble.
-Los codigos con los que se ha analizado los datos obtenidos en la sección anterior, generando sus respectivas gráficas.
-Finalmente, una sección de miscelanea donde se realizan otras gráficas ilustrativas para la memoria.
Para el funcionamiento de flows.ipynb se necesita guardar, en la misma carpeta donde se encuentra, los archivos de textos de la carpeta de 'TFG-sims/fotometrías'. Además, es necesario generar previamente tres carpetas llamadas 'resultados', 'Fit' y 'txt2'.
Si se quiere utilizar el apartado de ##ALEATORIO# también es necesario crear una carpeta llamada 'txt', pero es mejor utilizar #COMBINATORIA# en su lugar.
Si se quiere tratar directamente los resultados obtenidos sin realizar las simulaciones se deberá pegar los archivos de la carpeta 'TFG-sims/resultados' y 'TFG-sims/referencias' en la carpeta 'resultados'.
Para hacer funcionar MCMC.ipynb es necesario inicializarlo con Python3 y disponer de los paquetes emcee y corner, entre otros. El codigo está dividido en tres apartados:
-En primer lugar se muestra un código previo que trata H_0 y M_J como variables independientes a ajustar, como se puede comprobar los resultados no son aceptables.
-A continuación el codigo definito del ajuste. EN el se ajusta suponiendo H_0(M_J), el código genera las gráficas de corner con los resultados y la evolución de los parámetros para cada repetición.
-El último apartado genera los diagramas de Hubble y cálcula el valor de la constante de Hubble con su error (estadístico).
Para el funcionamiento de MCMC.ipynb es necesario disponer de los archivos de texto de la carpeta 'TFG-sims/resultados' que lleven el nombre 'Hubble' en una carpeta llamada 'Resultados'. Estos archivos de datos son generados por flows.ipynb.
En la carpeta 'TFG-sims/gráficas' se encuentran todas las figuras generadas durante el análisis de los datos de la simulación, curva de luz media y diagrama de Hubble.