Skip to content

Commit

Permalink
changed the scripts within the tessilator subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbinks committed Feb 29, 2024
1 parent 496a623 commit 7ec8857
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 24 deletions.
24 changes: 18 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
# SPECIFIC FILES AND DIRECTORIES
*.fits
*.png
activation4topcat
test_for_is_period_cont.txt
make_gif.py

contaminants
final_period_cal
fits
LargeRun
lc
lc_cont
paper
personal
TESS_100pc
pg
plots
practice
presentations
projects
results
shuf_plots
target_input
temp_results

tesssim/**/fits/
tessilator/tests/sector_tests
tessilator/tests/test_xypos_sector.py
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ author = Alex Binks & Moritz Guenther
author_email = abinks@mit.edu
url = https://github.com/alexbinks/tessilator
license = MIT License
copyright = 2023, Alex Binks & Moritz Guenther
copyright = 2024, Alex Binks & Moritz Guenther


[options]
Expand Down
21 changes: 11 additions & 10 deletions tessilator/scripts/run_tess_cutouts.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
from tessilator import tessilator

import numpy as np
import logging

def main(args=None):

fluxCon, lcCon, makePlots, fileRef, tFile = tessilator.setup_input_parameters()
conFile, periodFile = tessilator.setup_filenames(fileRef)
periodFile = tessilator.setup_filenames(fileRef)

Rad, SkyRad = 1.0, np.array([6.0,8.0])
gaia_sys = True

logging.basicConfig(filename="output.log", level=logging.WARNING)
logging.basicConfig(filename="output.log", level=logging.INFO)

print("Reading the table and formatting into astropy table structure.")
tTargets = tessilator.read_data(tFile)
print(tFile)
tTargets = tessilator.read_data(tFile, gaia_sys=gaia_sys, type_coord='icrs')
print("Done reading the table and formatting.")

print("...now calculating the contamination.")
tTargets = tessilator.collect_contamination_data(tTargets, fluxCon, lcCon,
conFile, Rad=Rad)
print("Done calculating the contamination.")

print("...now iterating over each source.")
tessilator.all_sources_cutout(tTargets, periodFile, lcCon, fluxCon, conFile,
makePlots, choose_sec=None, tot_attempts=2, cap_files=8)
tessilator.all_sources_cutout(tTargets, periodFile, lcCon, fluxCon,
makePlots, fileRef, Rad=Rad, choose_sec=None,
save_phot=True, cbv_flag=False, store_lc=True,
tot_attempts=10, cap_files=10, fix_noise=False)
11 changes: 4 additions & 7 deletions tessilator/scripts/run_tess_sectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@

def main(args=None):
logging.basicConfig(filename="output.log", level=logging.ERROR)

fluxCon, scc, makePlots, fileRef, tFile = tessilator.setup_input_parameters()
conFile, periodFile = tessilator.setup_filenames(fileRef, scc=scc)
periodFile = tessilator.setup_filenames(fileRef, scc=scc)
t_large_sec_check = tessilator.test_table_large_sectors(tFile)

if t_large_sec_check is not None:
Expand All @@ -22,8 +21,6 @@ def main(args=None):

tTargets = tTargets[tTargets['Sector'] == scc[0]]
Rad, SkyRad = 1.0, np.array([6.0,8.0])

tTargets = tessilator.collect_contamination_data(tTargets, fluxCon, 0,
conFile, Rad=Rad)

tessilator.all_sector(tTargets, scc, makePlots, periodFile)
tessilator.all_sources_sector(tTargets, scc, makePlots, periodFile,
fileRef, keep_data=False,
fix_noise=False, store_lc=False)

0 comments on commit 7ec8857

Please sign in to comment.