diff --git a/app/host/cutouts.py b/app/host/cutouts.py index d248c961..a9ce66f5 100644 --- a/app/host/cutouts.py +++ b/app/host/cutouts.py @@ -194,7 +194,7 @@ def panstarrs_cutout(position, image_size=None, filter=None): f"{service}ra={position.ra.degree}&dec={position.dec.degree}" f"&size={image_size}&format=fits&red={filename}" ) - fits_image = fits.open(fits_url,cache=None) + fits_image = fits.open(fits_url, cache=None) else: fits_image = None @@ -241,7 +241,7 @@ def galex_cutout(position, image_size=None, filter=None): .replace("-rr.fits.gz", "-int.fits.gz") .replace("-cnt.fits.gz", "-int.fits.gz") .replace("-xd-mcat.fits.gz", f"-{filter[0].lower()}d-int.fits.gz"), - cache=None + cache=None, ) wcs = WCS(fits_image[0].header) @@ -302,7 +302,7 @@ def WISE_cutout(position, image_size=None, filter=None): exptime = data["t_exptime"][0] if url is not None: - fits_image = fits.open(url,cache=None) + fits_image = fits.open(url, cache=None) wcs = WCS(fits_image[0].header) cutout = Cutout2D(fits_image[0].data, position, image_size, wcs=wcs) @@ -349,7 +349,9 @@ def DES_cutout(position, image_size=None, filter=None): # we need both the depth and the image time.sleep(1) try: - fits_image = fits.open(valid_urls[0].replace("-depth-", "-image-"),cache=None) + fits_image = fits.open( + valid_urls[0].replace("-depth-", "-image-"), cache=None + ) except: ### found some bad links... return None @@ -357,7 +359,7 @@ def DES_cutout(position, image_size=None, filter=None): # no idea what's happening here but this is a mess return None - depth_image = fits.open(valid_urls[0],cache=None) + depth_image = fits.open(valid_urls[0], cache=None) wcs_depth = WCS(depth_image[0].header) xc, yc = wcs_depth.wcs_world2pix(position.ra.deg, position.dec.deg, 0) @@ -404,7 +406,7 @@ def TWOMASS_cutout(position, image_size=None, filter=None): if re.match(f"https://irsa.*{filter.lower()}i.*fits", line.split("]]>")[0]): fitsurl = line.split("]]")[0] - fits_image = fits.open(fitsurl,cache=None) + fits_image = fits.open(fitsurl, cache=None) wcs = WCS(fits_image[0].header) if position.contained_by(wcs): @@ -483,7 +485,7 @@ def SDSS_cutout(position, image_size=None, filter=None): band=filter, ) - fits_image = fits.open(link,cache=None) + fits_image = fits.open(link, cache=None) wcs = WCS(fits_image[0].header) cutout = Cutout2D(fits_image[0].data, position, image_size, wcs=wcs) diff --git a/app/host/postprocess_prosp.py b/app/host/postprocess_prosp.py index b2d7c2ab..006164fc 100644 --- a/app/host/postprocess_prosp.py +++ b/app/host/postprocess_prosp.py @@ -305,9 +305,9 @@ def run_all( modphots_all.append(modmags) # model photometry modspecs_all.append(modspec) # model spectrum _mass = res["chain"][int(_subidx)][mass_idx] - stellarmass.append(np.log10(10**_mass)) # * sm)) + stellarmass.append(np.log10(10**_mass)) # * sm)) ssfr.append( - chains["sfr"][i] / 10**_mass #* sm + chains["sfr"][i] / 10**_mass # * sm ) # sfr chains are already sub-sampled stellarmass = np.array(stellarmass)