Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change import statements in coron #20

Merged
merged 1 commit into from
Jun 9, 2016
Merged
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
5 changes: 2 additions & 3 deletions jwst/coron/hlsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

:Authors: Howard Bushouse

:License: `<http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE>`_
"""

from __future__ import division

import numpy as np
import math

from jwst import datamodels
from .. import datamodels

import logging
log = logging.getLogger(__name__)
Expand Down Expand Up @@ -95,7 +94,7 @@ def contrast_curve(target_model, width):
sigmas = np.asarray(sigma)

# Create the output contrast curve data model
output_model = models.ContrastModel(contrast_table=list(zip(radii, sigmas)))
output_model = datamodels.ContrastModel(contrast_table=list(zip(radii, sigmas)))
output_model.update(target_model)

return output_model
Expand Down
6 changes: 3 additions & 3 deletions jwst/coron/hlsp_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import os

from jwst.stpipe import Step, cmdline
from jwst import datamodels
from ..stpipe import Step, cmdline
from .. import datamodels

from . import hlsp

Expand All @@ -23,7 +23,7 @@ def process(self, target):
width = self.annuli_width

# Open the input target image model
with models.ImageModel(target) as target_model:
with datamodels.ImageModel(target) as target_model:

# Create a signal-to-noise ratio image
self.log.info ('Creating SNR image')
Expand Down
1 change: 0 additions & 1 deletion jwst/coron/klip.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

:Authors: Mihai Cara

:License: `<http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE>`_
"""

from __future__ import division
Expand Down
8 changes: 4 additions & 4 deletions jwst/coron/klip_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import os

from jwst.stpipe import Step, cmdline
from jwst import datamodels
from ..stpipe import Step, cmdline
from .. import datamodels

from . import klip

Expand All @@ -22,14 +22,14 @@ class KlipStep(Step):

def process(self, target, psfrefs):

with models.ImageModel(target) as target_model:
with datamodels.ImageModel(target) as target_model:

# Retrieve the parameter values
truncate = self.truncate
self.log.info('KL transform truncation = %d', truncate)

# Get the PSF reference images
refs_model = models.CubeModel(psfrefs)
refs_model = datamodels.CubeModel(psfrefs)

# Call the KLIP routine
(target, psf) = klip.klip(target_model, refs_model, truncate)
Expand Down
9 changes: 4 additions & 5 deletions jwst/coron/stack_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@

:Authors: Howard Bushouse

:License: `<http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE>`_
"""

import numpy as np
from jwst import datamodels
from .. import datamodels

import logging
log = logging.getLogger(__name__)
Expand All @@ -23,7 +22,7 @@ def make_cube(input_table):
num_refs = len(input_table.input_filenames)

# Get the size of the first input image
img = models.ImageModel(input_table.input_filenames[0])
img = datamodels.ImageModel(input_table.input_filenames[0])
nrows, ncols = img.data.shape
img.close()

Expand All @@ -34,12 +33,12 @@ def make_cube(input_table):
# into the cube
for i, name in enumerate(input_table.input_filenames):
log.info('Adding member %s', name)
img = models.ImageModel(name)
img = datamodels.ImageModel(name)
cube[i] = img.data
img.close()

# Create the ouput Cube model
output_model = models.CubeModel(data=cube)
output_model = datamodels.CubeModel(data=cube)

return output_model

3 changes: 1 addition & 2 deletions jwst/coron/stack_refs_step.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#! /usr/bin/env python

from jwst.stpipe import Step, cmdline
from jwst import datamodels
from ..stpipe import Step, cmdline

import json
from . import stack_refs
Expand Down