<jupyter_start><jupyter_text>Box Time Series CookbookThis cookbook shows how to make a simple box time series for data for doing simple tests of spectroscopic data.<jupyter_code>from tshirt.pipeline import phot_pipeline
import matplotlib.pyplot as plt
%matplotlib inline<jupyter_output><empty_output><jupyter_text>Edit the Extraction ParametersHere, we start with the default parameters and edit them. Alternatively, you can create a `yaml` file that contains the parameters. There is a database of example parameters here:https://github.com/eas342/tshirt/tree/master/tshirt/parameters/spec_params<jupyter_code>default_phot = phot_pipeline.phot(directParam={})
newParam = default_phot.param
## Tell tshirt where to find the data files
newParam['procFiles'] = '../../../../Documents/hst/corot1/visit01/ibh*.fits'
## Give your source a name
newParam['srcName'] = 'CoRoT-1'
newParam['srcNameShort'] = 'corot1'
## Assign a name for the observing "Night" or name
newParam['nightName'] = 'visit01'
## Identify the box's spatial position. List of [x,y] lists
newParam['refStarPos'] = [[60,73]]
## Define the Geometry and size of the Aperture
newParam['srcGeometry'] = 'Rectangular'
newParam['apHeight'] = 10
newParam['apWidth'] = 30
## Define the background Geometry and size of Aperture
newParam['backWidth'] = 30
newParam['backHeight'] = 10
newParam['bkgGeometry'] = 'Rectangular'
## Choose an offset for the background box
newParam['backOffset'] = [0.,15.] ## here it is offset in X by 0.0 px and Y by 15.0 px

## Choose the FITS extension for the data
newParam['FITSextension'] = 'SCI'

## Set an offset epoch for time series (optional)
newParam['jdRef'] = 2455951

## Set the read noise
newParam['readNoise'] = 20.
phot = phot_pipeline.phot(directParam=newParam)<jupyter_output><empty_output><jupyter_text>Check the aperture`showStarChoices` shows the source and background apertures we created.The label "src" is for the first star in the list<jupyter_code>phot.showStarChoices(showAps=True,showPlot=True,apColor='red',backColor='green')<jupyter_output>WARNING: AstropyDeprecationWarning: "ax" was deprecated in version 0.7 and will be removed in a future version. Use argument "axes" instead. [tshirt.pipeline.phot_pipeline]
WARNING: AstropyDeprecationWarning: "ax" was deprecated in version 0.7 and will be removed in a future version. Use argument "axes" instead. [tshirt.pipeline.phot_pipeline]
/Users/everettschlawin/anaconda/envs/py36/lib/python3.6/site-packages/tshirt/pipeline/phot_pipeline.py:333: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
  fig.show()<jupyter_text>Do the Extraction on all imagesthe `useMultiprocessing` keyword uses several simultaneous processors to speed things up<jupyter_code>phot.do_phot(useMultiprocessing=True)
from importlib import reload
reload(phot_pipeline)
phot = phot_pipeline.phot(directParam=newParam)<jupyter_output><empty_output><jupyter_text>Retrieve the photometry<jupyter_code>t1, t2 = phot.get_tSeries()
plt.plot(t1['Time (JD)'],t1['Flux 0'],'o')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10797821211150273, 'fraction_numerical': 0.01762255687279718, 'mean_word_length': 6.651960784313726, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 1, '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}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '557291', 'license': 'MIT', 'n_tokens_mistral': 1041, 'n_tokens_neox': 978, 'n_words': 294, 'path': 'docs/phot_pipeline/box_time_series_cookbook.ipynb', 'repo_name': 'kglidic/tshirt', 'size': '3121'}