Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Physarah committed May 25, 2022
1 parent 8a5d52d commit ea7e9dd
Show file tree
Hide file tree
Showing 8 changed files with 280,187 additions and 41 deletions.
26 changes: 20 additions & 6 deletions examples/calculate_xgboost_sky.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"text": [
"/Users/physarah/Development/skypy/src/skypy/skymods/xgboost.py:38: DtypeWarning: Columns (37,38) have mixed types. Specify dtype option on import or set low_memory=False.\n",
" with_zodi_model = pd.read_csv(self.config['data_clean']['data_path'])\n",
"2022-05-24 17:23:07.700 | INFO | skypy.skymods.xgboost:__init__:61 - Not clipping data on the galatic plane\n",
"2022-05-24 17:23:07.717 | INFO | skypy.skymods.xgboost:__init__:92 - Not sigma clipping data\n",
"2022-05-24 17:23:07.724 | INFO | skypy.skymods.xgboost:train:144 - Using pre-calculated training data\n",
"2022-05-25 14:43:19.129 | INFO | skypy.skymods.xgboost:__init__:61 - Not clipping data on the galatic plane\n",
"2022-05-25 14:43:19.148 | INFO | skypy.skymods.xgboost:__init__:92 - Not sigma clipping data\n",
"2022-05-25 14:43:19.153 | INFO | skypy.skymods.xgboost:train:144 - Using pre-calculated training data\n",
"/anaconda3/envs/skypy/lib/python3.8/site-packages/xgboost/data.py:250: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead.\n",
" elif isinstance(data.columns, (pd.Int64Index, pd.RangeIndex)):\n"
]
Expand All @@ -44,7 +44,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[17:23:07] WARNING: ../src/learner.cc:576: \n",
"[14:43:19] WARNING: ../src/learner.cc:576: \n",
"Parameters: { \"early_stopping_rounds\", \"verbose\" } might not be used.\n",
"\n",
" This could be a false alarm, with some parameters getting used by language bindings but\n",
Expand Down Expand Up @@ -74,9 +74,23 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/latex": [
"$0.12784883 \\; \\mathrm{\\frac{MJy}{sr}}$"
],
"text/plain": [
"<Quantity 0.12784883 MJy / sr>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sky_value"
]
Expand Down
22 changes: 14 additions & 8 deletions examples/download_ceres_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/anaconda3/envs/skypy/lib/python3.8/site-packages/pysynphot/locations.py:345: UserWarning: Extinction files not found in /Volumes/CODE/Hubble/grp/hst/cdbs/extinction\n",
" warnings.warn('Extinction files not found in %s' % (extdir, ))\n",
"/anaconda3/envs/skypy/lib/python3.8/site-packages/pysynphot/refs.py:117: UserWarning: No graph or component tables found; functionality will be SEVERELY crippled. No files found for /Volumes/CODE/Hubble/grp/hst/cdbs/mtab/*_tmg.fits\n",
" warnings.warn('No graph or component tables found; '\n",
"/anaconda3/envs/skypy/lib/python3.8/site-packages/pysynphot/refs.py:124: UserWarning: No thermal tables found, no thermal calculations can be performed. No files found for /Volumes/CODE/Hubble/grp/hst/cdbs/mtab/*_tmt.fits\n",
" warnings.warn('No thermal tables found, '\n"
]
}
],
"source": [
"import pickle\n",
"import numpy as np\n",
Expand Down Expand Up @@ -197,13 +210,6 @@
"plt.ylim(0,175)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
22 changes: 14 additions & 8 deletions examples/full_example_calculate_flux_under_hst.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/anaconda3/envs/skypy/lib/python3.8/site-packages/pysynphot/locations.py:345: UserWarning: Extinction files not found in /Volumes/CODE/Hubble/grp/hst/cdbs/extinction\n",
" warnings.warn('Extinction files not found in %s' % (extdir, ))\n",
"/anaconda3/envs/skypy/lib/python3.8/site-packages/pysynphot/refs.py:117: UserWarning: No graph or component tables found; functionality will be SEVERELY crippled. No files found for /Volumes/CODE/Hubble/grp/hst/cdbs/mtab/*_tmg.fits\n",
" warnings.warn('No graph or component tables found; '\n",
"/anaconda3/envs/skypy/lib/python3.8/site-packages/pysynphot/refs.py:124: UserWarning: No thermal tables found, no thermal calculations can be performed. No files found for /Volumes/CODE/Hubble/grp/hst/cdbs/mtab/*_tmt.fits\n",
" warnings.warn('No thermal tables found, '\n"
]
}
],
"source": [
"from skypy.utils import package_directory, load_yaml, merge_two_dictionaries, add_to_pickel_file\n",
"from skypy.telescopes.hst import HubbleObservation, get_hst_ceres_fluxes_hourly\n",
Expand Down Expand Up @@ -261,13 +274,6 @@
"source": [
"pickel_dict"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
31 changes: 22 additions & 9 deletions examples/simple_example_flux_under_hst.ipynb

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions src/skypy/config/data.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Some useful dict kys to set if you are scripting and running lots of data
# If only using basic examples, this is not needed.

tle_files:
tle_directory: "/Volumes/DATA/data_sets/DataBackup/tles/hst_tle_archive.txt"
tle_storage_directory: "/Volumes/DATA/data_sets/DataBackup/tles"
raw_hst_data:
raw_dataset_directory: "/Volumes/DATA/data_sets/DataBackup/beta/raw_data_hubble"
file_to_process:
- "shortwave_hubble.csv"
tle_directory:
tle_storage_directory:
raw_ceres_data:
raw_dataset_directory: "/Volumes/DATA/data_sets/DataBackup/beta/raw_data_ceres"
raw_dataset_directory:
file_to_process:
- "CERES_SYN1deg-Day_Terra-Aqua-MODIS_Ed4A_Subset_20021101-20021130.nc"
pickel_directory: "/Users/physarah/Development/earthwatch/earthwatch/notebooks/pickles"
pickel_directory:
2 changes: 2 additions & 0 deletions src/skypy/config/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ model_params:
data_clean:
sigma_clip: False
clip_galatic: False
# path to the data you want to process. Use hst_skybackgrounds.csv in data as an example
data_path: "/Users/physarah/Development/skypy/src/skypy/data/hst_skybackgrounds.csv"

# The location of the cdbs for hubble (see readme)
PYSYN_CDBS: "/Volumes/CODE/Hubble/grp/hst/cdbs"
Loading

0 comments on commit ea7e9dd

Please sign in to comment.