Commit 7ebfbe3e authored by Nico  Manthey's avatar Nico Manthey
Browse files

add create_spine_w_fluxes.py, rearange label for asym errors on images

parent 01de717d
......@@ -133,7 +133,7 @@ eRASS_preselect_arcsecs: 30 # 1 arcsecond = 1°/3600
# if the distance to closest match
# exceeds this threshold.
# If None: keep match regardless of distance.
eRASS_discard_gt: 20
eRASS_discard_gt: 15
# if the above threshold is exceeded
......
from src.search_eRASS_fits import ERASS_Searcher
from src.tables_from_db import table_from_db, db_config, get_conn
from src.utils import read_and_print_config
from search_screened import remove_cols_for_spine_2
from pathlib import Path
import csv
def main():
config = read_and_print_config('config/config.yml', False)
package_path = Path(__file__).parent.absolute()
SPINE_SAVE_PATH = (package_path / "files_parent/spine_w_fluxes.tsv")
print("storing spine at:")
print(SPINE_SAVE_PATH)
spine = table_from_db('Spine', get_conn(db_config()))
spine = spine.rename(columns={'ra':'RA', 'dec':'DEC'})
searcher = ERASS_Searcher(config)
spine = searcher.search_eRASS_df(spine)
spine = remove_cols_for_spine_2(spine, config)
spine = spine.drop('addnotes', axis=1)
with open(SPINE_SAVE_PATH,'w') as f:
f.write('erofluxes\n')
spine[spine.columns].to_csv(SPINE_SAVE_PATH,
sep='\t',
mode='a',
index=False,
quoting=csv.QUOTE_NONE)
if __name__ == '__main__':
main()
......@@ -157,11 +157,11 @@ class Image_Writer():
labelled_img_cells, labelled_img_cells,
ml_flux_cells, dist_cells,
sci_shorten=True, index_ser=True)
data = self.write_one_corner(data, (630,480), 'flux err:',
data = self.write_one_corner(data, (630,480), 'err - :',
labelled_img_cells, labelled_img_cells,
err_m_cells, dist_cells,
sci_shorten=True, index_ser=True)
data = self.write_one_corner(data, (630,430), 'flux err:',
data = self.write_one_corner(data, (630,430), 'err + :',
labelled_img_cells, labelled_img_cells,
err_p_cells, dist_cells,
sci_shorten=True, index_ser=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment