<jupyter_start><jupyter_text>Exploring redshift evolution of galaxies using observational data + SED fittingWe shall use the fastpp output file, combine it with the zfourge catalog and investigate a few galaxy evolution properties.More information about fastpp (in C++) can be found here: https://github.com/cschreib/fastppinstall-instructionsThe original FAST paper for the IDL version https://ui.adsabs.harvard.edu/abs/2009ApJ...705L..71K/abstract (see Appendix, code at http://w.astro.berkeley.edu/~mariska/FAST.html)Once you've run fastpp on the cataloge provided there will be a `*.fout` file created. We will use this along with the `*.cat` file.<jupyter_code>from astropy.io import ascii
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>First load the two files and select galaxies with a `use=1` flag.<jupyter_code>zfourge_photometry = ascii.read('../fastpp_files/OUTPUT/cosmos_AstroTwin.cat').to_pandas()
zfourge_photometry.set_index('id', inplace=True)

zfourge_fast_out = ascii.read('../fastpp_files/OUTPUT/cosmos_AstroTwin.fout').to_pandas()
zfourge_fast_out.set_index('id', inplace=True)<jupyter_output><empty_output><jupyter_text>Now lets combine the two catalogues to one single DataFrame to make it easy for us and select all galaxies with a `use=1` flag.<jupyter_code>cosmos_combined_catalog = pd.merge(zfourge_photometry,zfourge_fast_out, 
                                   left_index=True, right_index=True, how='inner' )

cosmos_usable_galaxies = cosmos_combined_catalog.query('use==1')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09612983770287141, 'fraction_numerical': 0.00749063670411985, 'mean_word_length': 5.763713080168777, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '603330', 'license': 'MIT', 'n_tokens_mistral': 537, 'n_tokens_neox': 512, 'n_words': 137, 'path': 'codes/4_fastpp_exercise.ipynb', 'repo_name': 'themiyan/AstroTwinCoLo2018', 'size': '1602'}