From 2a069ed00d6f1c83153be9174c296e5540f37d30 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 20 Feb 2017 09:19:55 +0800 Subject: Rename 'context.py' to '_context.py' --- scripts/_context.py | 16 ++++++++++++++++ scripts/analyze_path.py | 2 +- scripts/calc_centroid.py | 2 +- scripts/clean_evt2.py | 2 +- scripts/collect_yaml.py | 2 +- scripts/context.py | 16 ---------------- scripts/cosmo_calc.py | 2 +- scripts/event2image.py | 2 +- scripts/manifest.py | 2 +- scripts/renorm_spectrum.py | 2 +- scripts/results.py | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 scripts/_context.py delete mode 100644 scripts/context.py diff --git a/scripts/_context.py b/scripts/_context.py new file mode 100644 index 0000000..b23b2c8 --- /dev/null +++ b/scripts/_context.py @@ -0,0 +1,16 @@ +# Copyright (c) 2017 Weitian LI +# MIT license + +""" +Portal to 'acispy' module/package +""" + +import os +import sys + +sys.path.insert( + 0, + os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) +) + +import acispy diff --git a/scripts/analyze_path.py b/scripts/analyze_path.py index 40ac393..d2acd42 100755 --- a/scripts/analyze_path.py +++ b/scripts/analyze_path.py @@ -16,7 +16,7 @@ The root directory of the object data has the format: import os import argparse -from context import acispy +from _context import acispy from acispy.analyze_path import get_name, get_obsid diff --git a/scripts/calc_centroid.py b/scripts/calc_centroid.py index 36fd766..2f4606f 100755 --- a/scripts/calc_centroid.py +++ b/scripts/calc_centroid.py @@ -16,7 +16,7 @@ import argparse import subprocess import tempfile -from context import acispy +from _context import acispy from acispy.manifest import get_manifest from acispy.pfiles import setup_pfiles from acispy.ds9 import ds9_view diff --git a/scripts/clean_evt2.py b/scripts/clean_evt2.py index f6914b1..5b53922 100755 --- a/scripts/clean_evt2.py +++ b/scripts/clean_evt2.py @@ -22,7 +22,7 @@ import subprocess import shutil import logging -from context import acispy +from _context import acispy from acispy.manifest import get_manifest from acispy.pfiles import setup_pfiles from acispy.acis import ACIS diff --git a/scripts/collect_yaml.py b/scripts/collect_yaml.py index 6758555..3147a0c 100755 --- a/scripts/collect_yaml.py +++ b/scripts/collect_yaml.py @@ -15,7 +15,7 @@ import sys import argparse import csv -from context import acispy +from _context import acispy from acispy.manifest import Manifest diff --git a/scripts/context.py b/scripts/context.py deleted file mode 100644 index b23b2c8..0000000 --- a/scripts/context.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2017 Weitian LI -# MIT license - -""" -Portal to 'acispy' module/package -""" - -import os -import sys - -sys.path.insert( - 0, - os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) -) - -import acispy diff --git a/scripts/cosmo_calc.py b/scripts/cosmo_calc.py index 7381da0..8650d2a 100755 --- a/scripts/cosmo_calc.py +++ b/scripts/cosmo_calc.py @@ -9,7 +9,7 @@ Cosmology calculator with support of Chandra ACIS-specific quantities. import argparse -from context import acispy +from _context import acispy from acispy.cosmo import Calculator diff --git a/scripts/event2image.py b/scripts/event2image.py index 3dc429f..44189e0 100755 --- a/scripts/event2image.py +++ b/scripts/event2image.py @@ -13,7 +13,7 @@ import sys import argparse import subprocess -from context import acispy +from _context import acispy from acispy.manifest import get_manifest from acispy.pfiles import setup_pfiles from acispy.acis import ACIS diff --git a/scripts/manifest.py b/scripts/manifest.py index df0361f..6b100f0 100755 --- a/scripts/manifest.py +++ b/scripts/manifest.py @@ -18,7 +18,7 @@ and other structures in the YAML file. .. _`PyYAML`: http://pyyaml.org/ """ -from context import acispy +from _context import acispy from acispy import manifest diff --git a/scripts/renorm_spectrum.py b/scripts/renorm_spectrum.py index 92c2132..9a0c110 100755 --- a/scripts/renorm_spectrum.py +++ b/scripts/renorm_spectrum.py @@ -15,7 +15,7 @@ import sys import argparse import subprocess -from context import acispy +from _context import acispy from acispy.spectrum import Spectrum diff --git a/scripts/results.py b/scripts/results.py index c3c2379..d325dc3 100755 --- a/scripts/results.py +++ b/scripts/results.py @@ -10,7 +10,7 @@ Manage the analysis results in YAML format. """ -from context import acispy +from _context import acispy from acispy import results -- cgit v1.2.2