<commit_before># Making Composite Spectrum and Fitting Emission Lines

The goal is to stack multiple spectra, make a composite spectrum, and fit optical emission lines with Gaussian profiles to calculate the line luminosities. 

The details of the stacking method is discussed at *Shivaei et al. (2017, ApJ, in press)*.

## Code Details

### stack_driver.py

This is the driver that calls the two main codes [stackspec_script.py](#stackspec_scriptpy) and [linefit.py](#linefitpy).

### [stackspec_script.py](#stackspec_scriptpy)

This code stacks the spectra. The output is a fits file with eight extensions:
<commit_msg>Modify README<commit_after># Making Composite Spectrum and Fitting Emission Lines

The python scripts presented here are to stack multiple spectra, make a composite spectrum, and fit optical emission lines with Gaussian profiles to calculate the line luminosities. 

The details of the stacking method is discussed at *Shivaei et al. (2017, ApJ, in press)*.

Contributions are very welcomed!


## Code Details

### stack_driver.py

This is the driver that calls the two main codes [stackspec_script.py](#stackspec_scriptpy) and [linefit.py](#linefitpy).

### [stackspec_script.py](#stackspec_scriptpy)

This code stacks the spectra. The output is a fits file with eight extensions:

{'fraction_non_alphanumeric': 0.06983883346124328, 'fraction_numerical': 0.0061396776669224865, 'mean_word_length': 5.239234449760765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4056884', 'n_tokens_mistral': 367, 'n_tokens_neox': 340, 'n_words': 166}