Skip to content

Commit

Permalink
restructuring and preparing 3band
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrihanSolo committed Jun 21, 2024
1 parent ff9215f commit 15c4e16
Show file tree
Hide file tree
Showing 64 changed files with 2,869 additions and 42 deletions.
1 change: 1 addition & 0 deletions data
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DATASET:
NAME: SourceData # set a name, this value is only used if you request the h5 file format
PARAMETERS:
SIZE: 50000 # number of images in the full datase.
OUTDIR: ../src/sim/data/pax_orig_source # will be created on your system if your request to save images
OUTDIR: ../../data/fid_source # will be created on your system if your request to save images
SEED: 10

COSMOLOGY:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DATASET:
NAME: TargetData # set a name, this value is only used if you request the h5 file format
PARAMETERS:
SIZE: 50000 # number of images in the full datase.
OUTDIR: pax_orig_target
OUTDIR: ../../data/fid_target
SEED: 10

COSMOLOGY:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DATASET:
NAME: SourceData # set a name, this value is only used if you request the h5 file format
PARAMETERS:
SIZE: 50000 # number of images in the full datase.
OUTDIR: ../src/sim/data/mb_source # will be created on your system if your request to save images
OUTDIR: ../../data/mb_source # will be created on your system if your request to save images
SEED: 10

COSMOLOGY:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DATASET:
NAME: TargetData # set a name, this value is only used if you request the h5 file format
PARAMETERS:
SIZE: 50000 # number of images in the full datase.
OUTDIR: ../src/sim/data/mb_target
OUTDIR: ../../data/mb_target
SEED: 10

COSMOLOGY:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 47 additions & 13 deletions notebooks/gen_sim.ipynb → sim/notebooks/gen_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -12,7 +12,23 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"def rename_result(name, head):\n",
" datapath = head / f'data/{name}'\n",
" imgpath = datapath / 'CONFIGURATION_1_images.npy'\n",
" mdpath = datapath / 'CONFIGURATION_1_metadata.csv'\n",
" if imgpath.exists():\n",
" imgpath.rename(datapath / (datapath.name + '.npy'))\n",
" if mdpath.exists():\n",
" mdpath.rename(datapath / (datapath.name + '_metadata.csv'))"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -22,19 +38,28 @@
"Entering main organization loop\n",
"Organizing CONFIGURATION_1\n",
"Generating images for CONFIGURATION_1\n",
"\tProgress: 100.0 % --- Elapsed Time: 0 H 8 M 46 S \n"
"\tProgress: 100.0 % --- Elapsed Time: 0 H 1 M 58 S \n"
]
}
],
"source": [
"head = Path.cwd().parent\n",
"config_file = head / 'src/sim/configs/multiband_source.yaml'\n",
"head = Path.cwd().parent.parent\n",
"config_file = head / 'sim/configs/fid_source.yaml'\n",
"dataset = dl.make_dataset(config_file, verbose=True, save_to_disk=True)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"rename_result('fid_source', head)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -44,16 +69,25 @@
"Entering main organization loop\n",
"Organizing CONFIGURATION_1\n",
"Generating images for CONFIGURATION_1\n",
"\tProgress: 100.0 % --- Elapsed Time: 0 H 8 M 20 S \n"
"\tProgress: 100.0 % --- Elapsed Time: 0 H 1 M 58 S \n"
]
}
],
"source": [
"head = Path.cwd().parent\n",
"config_file = head / 'src/sim/configs/multiband_target.yaml'\n",
"head = Path.cwd().parent.parent\n",
"config_file = head / 'sim/configs/fid_target.yaml'\n",
"dataset = dl.make_dataset(config_file, verbose=True, save_to_disk=True)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"rename_result('fid_target', head)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -64,9 +98,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "deeplens",
"display_name": "Python [conda env:.conda-deeplens]",
"language": "python",
"name": "python3"
"name": "conda-env-.conda-deeplens-py"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -78,9 +112,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.16"
"version": "3.7.12"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed src/sim/data/.DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions src/sim/data/.gitignore

This file was deleted.

Binary file removed src/sim/data/mb_target/.DS_Store
Binary file not shown.
23 changes: 0 additions & 23 deletions test/test_example.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 15c4e16

Please sign in to comment.