<commit_before>import numpy as np, os, glob

from astropy.io import fits
from astropy.table import Table, vstack, join
from astropy.coordinates import SkyCoord
from astropy import units as u
from astropy.cosmology import Planck15 as p15
from astropy import visualization as vis
from astropy.wcs import WCS
from astropy.stats import sigma_clipped_stats

from scipy.interpolate import interp1d, interp2d, RegularGridInterpolator
from scipy.sparse import lil_matrix, save_npz
from scipy import stats as sci_st
from scipy.integrate import simps

from frb.halos.models import ModifiedNFW, halomass_from_stellarmass
from frb.frb import FRB
from frb.galaxies import cigale as frbcig
from frb.galaxies import eazy as frb_ez
from frb.surveys import des
from frb.surveys.catalog_utils import convert_mags_to_flux

from pathos.multiprocessing import ProcessingPool as Pool
import progressbar

from matplotlib import pyplot as plt

from threedhst import eazyPy as ez

from importlib import reload

DEFAULT_DATA_FOLDER = "data"

def get_des_data(coords:SkyCoord, radius:u.Quantity=15.*u.arcmin, starbright:float=17,
                 starflagval:float=0.9, gaiacat:str=None, write:bool=False, outfile:str=None)->Table:
    """
    Download photometry for galaxies within an FRB field.<commit_msg>better imports<commit_after>import numpy as np, os, glob

from astropy.table import Table, vstack, join
from astropy.coordinates import SkyCoord
from astropy import units as u
from astropy.cosmology import Planck15 as p15
from astropy.stats import sigma_clipped_stats

from scipy.interpolate import interp1d, interp2d, RegularGridInterpolator
from scipy.sparse import lil_matrix, save_npz

from frb.halos.models import ModifiedNFW, halomass_from_stellarmass
from frb.frb import FRB
from frb.galaxies import cigale as frbcig
from frb.galaxies import eazy as frb_ez
from frb.surveys import des

try:
    from pathos.multiprocessing import ProcessingPool as Pool
except ImportError:
    print("You will need to run 'pip install pathos' to use some functions in this module.")
try:
    import progressbar
except ImportError:
    print("You will need to run 'pip install progressbar2' to use some functions in this module.")
try:
    from threedhst import eazyPy as ez
except ImportError:
    print("You will need to run 'pip install threedhst' to read EAZY output.")

DEFAULT_DATA_FOLDER = "data"

def get_des_data(coords:SkyCoord, radius:u.Quantity=15.*u.arcmin, starbright:float=17,
                 starflagval:float=0.9, gaiacat:str=None, write:bool=False, outfile:str=None)->Table:
    """
    Download photometry for galaxies within an FRB field.
{'fraction_non_alphanumeric': 0.05779467680608365, 'fraction_numerical': 0.009505703422053232, 'mean_word_length': 5.147196261682243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5274409', 'n_tokens_mistral': 870, 'n_tokens_neox': 837, 'n_words': 289}