diff --git a/astropy_helpers b/astropy_helpers index 6d5020f3..c55cb6da 160000 --- a/astropy_helpers +++ b/astropy_helpers @@ -1 +1 @@ -Subproject commit 6d5020f367d4956bb614e08b64ab44ef53d54dcd +Subproject commit c55cb6dae107c3a15e93887c76b673678de81e1a diff --git a/specreduce/target_identify.py b/specreduce/target_identify.py new file mode 100644 index 00000000..bdb18688 --- /dev/null +++ b/specreduce/target_identify.py @@ -0,0 +1,30 @@ +from __future__ import (absolute_import, division, print_function, + unicode_literals) + + +import logging +import numpy as np +from scipy.stats import sigma_clip + + + +def identify_targets(data, nfind=1, axis=1, background_threshold=3, model_name='gaussian'): + + # assuming target is relatively well aligned with the spatial axis + spatial_profile = np.median(data, axis=axis) + + + # remove background + clipped_spatial_profile = sigma_clip() + + # identify peaks + + + # filter peaks + + + # construct model and fit + + + # return model or set of parameters such as target center, width. +