Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion astropy_helpers
30 changes: 30 additions & 0 deletions specreduce/target_identify.py
Original file line number Diff line number Diff line change
@@ -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.