Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all references to central store #83

Open
wants to merge 1 commit into
base: dr5b
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions utils/lcogt_dr4.pro

This file was deleted.

18 changes: 0 additions & 18 deletions utils/lcogt_dr5.pro

This file was deleted.

20 changes: 0 additions & 20 deletions utils/lcogt_orion.pro

This file was deleted.

3 changes: 1 addition & 2 deletions utils/lcogt_uphot.pro
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ function get_counts,star,calimage,catfile,exptime_cal,airmass_cal
if sxpar(hdr,'WCSERR') ne 0 then begin

;;borrow an image with good WCS
datadir='/astro/ullyses/lcogt_data/'
case star of
'V* BP Tau': good=datadir+'V-BP-TAU-CAL/ogg0m406-kb27-20210909-0216-e91.fits.fz'
'V* GM Aur': good=datadir+'V-GM-AUR-CAL/ogg0m404-kb82-20211010-0250-e91.fits.fz'
Expand Down Expand Up @@ -285,7 +284,7 @@ function photometry,target,image,calimage,catfile,filter,targ_ra,targ_dec,f0,PLO

end

pro lcogt_uphot,imagedir,target,PLOT=plot
pro lcogt_uphot,imagedir,target,PLOT=plot,datadir

;;uncomment when debugging to close any output files
close,/all
Expand Down
77 changes: 0 additions & 77 deletions utils/make_alias_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,83 +183,6 @@ def fix_pipes(all_aliases):

return all_aliases

# NOT IN USE
def create_fuse_alias2():
# NOT IN USE
fuse_targs0 = glob.glob("/astro/ullyses/ullyses_target/data/SMC/FUSE/*") + \
glob.glob("/astro/ullyses/ullyses_target/data/LMC/FUSE/*") + \
glob.glob("/astro/ullyses/ullyses_target/data/SMC_FUSE/FUSE/*") + \
glob.glob("/astro/ullyses/ullyses_target/data/LMC_FUSE/FUSE/*")
fuse_targs = [os.path.basename(x) for x in fuse_targs0]
fuse_targs_upper = [x.upper() for x in fuse_targs]

fuse_dicts = []
for i in range(len(fuse_targs0)):
fuse_d = {}
fuse_d["dirname"] = fuse_targs_upper[i]

partial_d = fuse_targs0[i]
partial_d = partial_d.replace("[", "LEFTBRACKET")
partial_d = partial_d.replace("]", "RIGHTBRACKET")
partial_d = partial_d.replace("LEFTBRACKET", "[[]")
partial_d = partial_d.replace("RIGHTBRACKET", "[]]")
files = glob.glob(os.path.join(partial_d, "*", "*.fit*"))
targnames0 = [fits.getval(x, "targname") for x in files]
targnames = list(set(targnames0))
for j in range(len(targnames)):
fuse_d[f"targname{j}"] = targnames[j]
fuse_dicts.append(fuse_d)

df = pd.DataFrame(fuse_dicts)
df = clean_df(df)
df.to_json("data/target_metadata/fuse_target_aliases.json", orient="split")
print("Wrote data/target_metadata/fuse_target_aliases.json")


# manual_insert.json includes manually matched FUSE names to ULLYSES names.
# This only needs to be run once and never again.
def create_fuse_alias(infile="data/target_metadata/manual_insert.json"):
fuse_targs0 = glob.glob("/astro/ullyses/ullyses_target/data/SMC/FUSE/*") + \
glob.glob("/astro/ullyses/ullyses_target/data/LMC/FUSE/*") + \
glob.glob("/astro/ullyses/ullyses_target/data/SMC_FUSE/FUSE/*") + \
glob.glob("/astro/ullyses/ullyses_target/data/LMC_FUSE/FUSE/*")
fuse_targs = [os.path.basename(x) for x in fuse_targs0]
fuse_targs_upper = [x.upper() for x in fuse_targs]

df = pd.read_json(infile, orient="split")
for i in range(len(df)):
fuse_targ = df.loc[i, "alias0"]
fuse_targ = fuse_targ.upper()

inds = [j for j in range(len(fuse_targs_upper)) if fuse_targs_upper[j] == fuse_targ]
toadd = []
for ind in inds:
d = fuse_targs0[ind]
d = d.replace("[", "LEFTBRACKET")
d = d.replace("]", "RIGHTBRACKET")
d = d.replace("LEFTBRACKET", "[[]")
d = d.replace("RIGHTBRACKET", "[]]")
files = glob.glob(os.path.join(d, "*", "*.fit*"))
toadd0 = [fits.getval(x, "targname") for x in files]
toadd += list(set(toadd0))

toadd = list(set(toadd))

emptycols = df.columns[df.iloc[i].isna()].tolist()
if len(toadd) > len(emptycols):
for comparisoncol in range(len(toadd)-len(emptycols)):
aliasno = len(df.columns)-1
df[f"alias{aliasno}"] = np.nan
emptycols = df.columns[df.iloc[i].isna()].tolist()
for j in range(len(toadd)):
df.loc[i,emptycols[j]] = toadd[j]



df = clean_df(df)
df.to_json(FUSEFILE1, orient="split")
print(f"Wrote {FUSEFILE1}")


def remove_withdrawn(df):
# Sometimes rows with target=WITHDRAWN get in the aliases DF. Remove them.
Expand Down
125 changes: 0 additions & 125 deletions utils/vignette_correct.pro

This file was deleted.