-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53a362a
commit 628ada4
Showing
7 changed files
with
99 additions
and
17,643 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
The data directory contains a few data sets used in example python files and notebooks: | ||
- data/demo_image.fits: Contains an image file created using fake_data_creator.py and containing a single fake object. | ||
- data/demo_data.fits: Contains a WorkUnit generated via the create_fake_data notebook. | ||
- data/small: Contains 10 small image files created using fake_data_creator.py and containing a single fake object. | ||
- data/fake_results: Contains the results of running the KBMOD_Demo notebook on the data in data/demo. For a description of the files see the KBMOD documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
"""A helper function for creating data used in the demo notebook | ||
and some of the tests. | ||
""" | ||
|
||
import os | ||
|
||
from kbmod.configuration import SearchConfiguration | ||
from kbmod.fake_data.fake_data_creator import * | ||
from kbmod.search import * | ||
|
||
def make_demo_data(filename=None): | ||
"""Make the fake demo data. | ||
Parameters | ||
---------- | ||
filename : `str` | ||
The path and file anem to store the demo data. If ``None`` then | ||
does not save the demo data. | ||
Returns | ||
------- | ||
work : `WorkUnit` | ||
A WorkUnit with the fake data. | ||
""" | ||
# Set the characteristics of the fake data. | ||
img_width = 256 | ||
img_height = 256 | ||
num_times = 20 | ||
|
||
# Create the fake images | ||
fake_times = create_fake_times(num_times, t0=57130.2) | ||
ds = FakeDataSet(img_width, img_height, fake_times) | ||
|
||
# Insert a fake object with only horizontal velocity. | ||
trj = Trajectory(x=50, y=40, vx=10, vy=0, flux=500) | ||
ds.insert_object(trj) | ||
|
||
# Create configuraiton settings that match the object inserted. | ||
settings = { | ||
# Override the search data to match the known object. | ||
"average_angle": 0.0, | ||
"v_arr": [0, 20, 20], | ||
"ang_arr": [0.5, 0.5, 10], | ||
# Loosen the other filtering parameters. | ||
"clip_negative": True, | ||
"sigmaG_lims": [15, 60], | ||
"mom_lims": [37.5, 37.5, 1.5, 1.0, 1.0], | ||
"peak_offset": [3.0, 3.0], | ||
} | ||
config = SearchConfiguration.from_dict(settings) | ||
|
||
# Create a WorkUnit and save it if needed. | ||
work = WorkUnit(im_stack=ds.stack, config=config, wcs=ds.fake_wcs) | ||
if filename is not None: | ||
work.to_fits(filename) | ||
return work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters