Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stharrold/25f7889f4fcf1111d6bd to your computer and use it in GitHub Desktop.
Save stharrold/25f7889f4fcf1111d6bd to your computer and use it in GitHub Desktop.
20150314T163000_troubleshoot_read_spe_xml.txt
grad09sh:tsphot harrold$ pwd
/Users/harrold/Documents/GitHub/ccd-utexas/tsphot
grad09sh:tsphot harrold$ ls
BACKUP README.md read_spe.pyc utils.py
CONTRIBUTING.md __init__.py reduce_config.json utils.pyc
LICENSE main.py spe_30_header_format.csv verify_timestamps.py
MANIFEST.in read_spe.py test
grad09sh:tsphot harrold$ git branch
develop
gh-pages
master
* pipeline
grad09sh:tsphot harrold$ git checkout master
Switched to branch 'master'
grad09sh:tsphot harrold$ git pull
Already up-to-date.
grad09sh:tsphot harrold$ # following http://nvie.com/posts/a-successful-git-branching-model/
grad09sh:tsphot harrold$ git tags
git: 'tags' is not a git command. See 'git --help'.
Did you mean one of these?
stage
tag
grad09sh:tsphot harrold$ git tag -l
0.1.0
v0.0.1
v0.0.2
v0.0.3
v0.0.4
v0.0.4-alpha
v0.1.0
v0.2.0
v1.0.0
v1.0.1
v1.0.2
v1.0.3
v1.1.0
grad09sh:tsphot harrold$ git checkout -b hotfix_read_spe_xml master
Switched to a new branch 'hotfix_read_spe_xml'
grad09sh:tsphot harrold$ emacs read_spe.py
grad09sh:tsphot harrold$ git status
# On branch hotfix_read_spe_xml
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: read_spe.py
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .ipynb_checkpoints/
no changes added to commit (use "git add" and/or "git commit -a")
grad09sh:tsphot harrold$ git diff
diff --git a/read_spe.py b/read_spe.py
index 8f51f56..1ffe448 100644
--- a/read_spe.py
+++ b/read_spe.py
@@ -10,7 +10,8 @@ ftp://ftp.princetoninstruments.com/public/Manuals/Princeton%20Instruments/Experi
Note: Use with SPE 3.0. Not backwards compatible with SPE 2.X.
"""
-# TODO: make test modules with test_yes/no_footer.spe files
+# TODO: make pytest modules with test_yes/no_footer.spe files
+# TODO: fix docstrings to match numpy style: https://github.com/numpy/numpy/blob/master/doc/example.py
from __future__ import absolute_import, division, print_function
import argparse
@@ -19,11 +20,13 @@ import sys
import StringIO
import numpy as np
import pandas as pd
+import pdb
class File(object):
"""
Handle an SPE file.
"""
+ # TODO: Don't use protected keyword 'file' as class name.
# Class-wide variables.
_bits_per_byte = 8
# TODO: don't hardcode number of metadata, get from user or footer if it exists
@@ -171,6 +174,7 @@ class File(object):
pieces = xml.rpartition('SpeFormat>')
xml = ''.join(pieces[:-1])
self.footer_metadata = xml
+ pdb.set_trace()
return None
def _get_start_offset(self):
grad09sh:tsphot harrold$ git commit -am "read_spe.py: added pdb for testing, ref #108"
[hotfix_read_spe_xml a3b7623] read_spe.py: added pdb for testing, ref #108
1 file changed, 5 insertions(+), 1 deletion(-)
grad09sh:tsphot harrold$ git status
# On branch hotfix_read_spe_xml
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .ipynb_checkpoints/
nothing added to commit but untracked files present (use "git add" to track)
grad09sh:tsphot harrold$ ls
LICENSE focus.py read_spe.pyc test
MANIFEST.in lc_online2.py read_spe.py~ utils.pyc
README.md main.py spe_30_header_format.csv
fits_process.py read_spe.py spe_process.py
grad09sh:tsphot harrold$ rm -rf .ipynb_checkpoints/
grad09sh:tsphot harrold$ ls
LICENSE focus.py read_spe.pyc test
MANIFEST.in lc_online2.py read_spe.py~ utils.pyc
README.md main.py spe_30_header_format.csv
fits_process.py read_spe.py spe_process.py
grad09sh:tsphot harrold$ git push origin hotfix_read_spe_xml
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 499 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
* [new branch] hotfix_read_spe_xml -> hotfix_read_spe_xml
grad09sh:tsphot harrold$ scp sth499@lonestar.tacc.utexas.edu:/corral-repl/utexas/White_Dwarf_Archive/ProEM_1024B/20141121/SDSSJ0651+2844/SDSSJ0651+2844.spe ~/Downloads/.
Password:
SDSSJ0651+2844.spe 100% 202MB 11.2MB/s 00:18
grad09sh:tsphot harrold$ ipython notebook --quiet &
[1] 66052
grad09sh:tsphot harrold$ # testing in an ipython notebook following https://github.com/ccd-utexas/tsphot/wiki/Interactive-analysis-with-an-SPE-file
grad09sh:tsphot harrold$ emacs read_spe.py
grad09sh:tsphot harrold$ git diff
diff --git a/read_spe.py b/read_spe.py
index 1ffe448..301e2ad 100644
--- a/read_spe.py
+++ b/read_spe.py
@@ -12,9 +12,13 @@ Note: Use with SPE 3.0. Not backwards compatible with SPE 2.X.
"""
# TODO: make pytest modules with test_yes/no_footer.spe files
# TODO: fix docstrings to match numpy style: https://github.com/numpy/numpy/blob/master/doc/example.py
+# TODO: remove pandas dependency. use builtin csv module.
+# TODO: Use logging levels instead of print.
+
from __future__ import absolute_import, division, print_function
import argparse
+import copy
import os
import sys
import StringIO
@@ -22,6 +26,7 @@ import numpy as np
import pandas as pd
import pdb
+
class File(object):
"""
Handle an SPE file.
@@ -161,22 +166,33 @@ class File(object):
"""
tf_mask = (self.header_metadata["Type_Name"] == "XMLOffset")
xml_offset = int(self.header_metadata[tf_mask]["Value"].values[0])
+ pdb.set_trace()
if xml_offset == 0:
print(("INFO: XML footer metadata is empty for:\n"
+" {fname}").format(fname=self._fname))
else:
- self._fid.seek(xml_offset)
# All XML footer metadata is contained within one line.
# Strip anything before '<SpeFormat' or after 'SpeFormat>'
- xml = self._fid.read()
- pieces = xml.partition('<SpeFormat')
- xml = ''.join(pieces[1:])
- pieces = xml.rpartition('SpeFormat>')
- xml = ''.join(pieces[:-1])
+ # The byte offset for the start of the XML file can be off if the file
+ # is not begun/ended correctly. Search for the beginning of the XML
+ # footer 1KB before the byte offset and trim the excess.
+ self._fid.seek(xml_offset - 1024)
+ xml_orig = self._fid.read()
+ xml_trim = copy.copy(xml_orig)
+ pieces = xml_trim.partition('<SpeFormat')
+ xml_trim = ''.join(pieces[1:])
+ pieces = xml_trim.rpartition('SpeFormat>')
+ xml_trim = ''.join(pieces[:-1])
+ if xml_trim == '':
+ print(("WARNING: XML footer was not partitioned correctly\n" +
+ "and may need to be reformatted."), file=sys.stderr)
+ xml = xml_orig
+ else:
+ xml = xml_trim
self.footer_metadata = xml
- pdb.set_trace()
return None
+
def _get_start_offset(self):
"""
Return offset byte position of start of all data.
grad09sh:tsphot harrold$ git commit -am "read_spe.py: patched xml parser. now testing. ref #108"
[hotfix_read_spe_xml d9e3c61] read_spe.py: patched xml parser. now testing. ref #108
1 file changed, 23 insertions(+), 7 deletions(-)
grad09sh:tsphot harrold$ git push origin hotfix_read_spe_xml
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 782 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
a3b7623..d9e3c61 hotfix_read_spe_xml -> hotfix_read_spe_xml
grad09sh:tsphot harrold$ emacs read_spe.py
grad09sh:tsphot harrold$ git diff
diff --git a/read_spe.py b/read_spe.py
index 301e2ad..d55d8a4 100644
--- a/read_spe.py
+++ b/read_spe.py
@@ -13,7 +13,7 @@ Note: Use with SPE 3.0. Not backwards compatible with SPE 2.X.
# TODO: make pytest modules with test_yes/no_footer.spe files
# TODO: fix docstrings to match numpy style: https://github.com/numpy/numpy/blob/master/doc/example.py
# TODO: remove pandas dependency. use builtin csv module.
-# TODO: Use logging levels instead of print.
+# TODO: Use logging levels (and warnings.warn) instead of print.
from __future__ import absolute_import, division, print_function
@@ -24,7 +24,6 @@ import sys
import StringIO
import numpy as np
import pandas as pd
-import pdb
class File(object):
@@ -166,7 +165,6 @@ class File(object):
"""
tf_mask = (self.header_metadata["Type_Name"] == "XMLOffset")
xml_offset = int(self.header_metadata[tf_mask]["Value"].values[0])
- pdb.set_trace()
if xml_offset == 0:
print(("INFO: XML footer metadata is empty for:\n"
+" {fname}").format(fname=self._fname))
grad09sh:tsphot harrold$ git commit -am "read_spe.py: patch works. making pytest. ref #108"
[hotfix_read_spe_xml 8b507be] read_spe.py: patch works. making pytest. ref #108
1 file changed, 1 insertion(+), 3 deletions(-)
grad09sh:tsphot harrold$ git push origin hotfix_read_spe_xml
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 350 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
d9e3c61..8b507be hotfix_read_spe_xml -> hotfix_read_spe_xml
grad09sh:tsphot harrold$ ls
20150314T163000_troubleshoot_read_spe_xml.ipynb focus.py read_spe.py~
LICENSE lc_online2.py spe_30_header_format.csv
MANIFEST.in main.py spe_process.py
README.md read_spe.py test
fits_process.py read_spe.pyc utils.pyc
grad09sh:tsphot harrold$ git rm 20150314T163000_troubleshoot_read_spe_xml.ipynb
fatal: pathspec '20150314T163000_troubleshoot_read_spe_xml.ipynb' did not match any files
grad09sh:tsphot harrold$ open .
grad09sh:tsphot harrold$ cd test
grad09sh:test harrold$ ls
aperture.pdf test_dark_10s 2014-05-20 21_49_21.spe
lc.pdf test_dark_20140520.lfe
lightcurve.app test_dark_20s 2014-05-20 21_45_44-Frame-1.fits
phot_coords test_dark_20s 2014-05-20 21_45_44-Frame-2.fits
psf_fit.pdf test_dark_20s 2014-05-20 21_45_44-Frame-3.fits
test_bias 2014-05-20 22_00_21-Frame-1.fits test_dark_20s 2014-05-20 21_45_44-Frame-4.fits
test_bias 2014-05-20 22_00_21-Frame-2.fits test_dark_20s 2014-05-20 21_45_44-Frame-5.fits
test_bias 2014-05-20 22_00_21-Frame-3.fits test_dark_20s 2014-05-20 21_45_44.spe
test_bias 2014-05-20 22_00_21-Frame-4.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits
test_bias 2014-05-20 22_00_21-Frame-5.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits
test_bias 2014-05-20 22_00_21.spe test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits
test_bias_20140520.lfe test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits
test_dark_10s 2014-05-20 21_49_21-Frame-1.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits
test_dark_10s 2014-05-20 21_49_21-Frame-2.fits test_lightbox_10s 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-3.fits test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-4.fits test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-5.fits test_lightbox_20140520.lfe
grad09sh:test harrold$ pwd
/Users/harrold/Documents/GitHub/ccd-utexas/tsphot/test
grad09sh:test harrold$ emacs test_read_spe.py
grad09sh:test harrold$ ls
aperture.pdf test_dark_20s 2014-05-20 21_45_44-Frame-1.fits
lc.pdf test_dark_20s 2014-05-20 21_45_44-Frame-2.fits
lightcurve.app test_dark_20s 2014-05-20 21_45_44-Frame-3.fits
phot_coords test_dark_20s 2014-05-20 21_45_44-Frame-4.fits
psf_fit.pdf test_dark_20s 2014-05-20 21_45_44-Frame-5.fits
test_bias 2014-05-20 22_00_21-Frame-1.fits test_dark_20s 2014-05-20 21_45_44.spe
test_bias 2014-05-20 22_00_21-Frame-2.fits test_footer.txt
test_bias 2014-05-20 22_00_21-Frame-3.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits
test_bias 2014-05-20 22_00_21-Frame-4.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits
test_bias 2014-05-20 22_00_21-Frame-5.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits
test_bias 2014-05-20 22_00_21.spe test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits
test_bias_20140520.lfe test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits
test_dark_10s 2014-05-20 21_49_21-Frame-1.fits test_lightbox_10s 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-2.fits test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-3.fits test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-4.fits test_lightbox_20140520.lfe
test_dark_10s 2014-05-20 21_49_21-Frame-5.fits test_read_spe.py
test_dark_10s 2014-05-20 21_49_21.spe test_read_spe.py~
test_dark_20140520.lfe
grad09sh:test harrold$ cd ..
grad09sh:tsphot harrold$ ls
20150314T163000_troubleshoot_read_spe_xml.ipynb focus.py read_spe.py~
LICENSE lc_online2.py spe_30_header_format.csv
MANIFEST.in main.py spe_process.py
README.md read_spe.py test
fits_process.py read_spe.pyc utils.pyc
grad09sh:tsphot harrold$ git status
# On branch hotfix_read_spe_xml
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .ipynb_checkpoints/
# 20150314T163000_troubleshoot_read_spe_xml.ipynb
# test/test_footer.txt
# test/test_read_spe.py
nothing added to commit but untracked files present (use "git add" to track)
grad09sh:tsphot harrold$ git add test/test_footer.txt
grad09sh:tsphot harrold$ git add test/test_read_spe.py
grad09sh:tsphot harrold$ git commit -am "test_read_spe.py: created pytest. ref #108, ref #102"
[hotfix_read_spe_xml 9e3293b] test_read_spe.py: created pytest. ref #108, ref #102
2 files changed, 21 insertions(+)
create mode 100644 test/test_footer.txt
create mode 100644 test/test_read_spe.py
grad09sh:tsphot harrold$ git push origin hotfix_read_spe_xml
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 2.51 KiB | 0 bytes/s, done.
Total 5 (delta 2), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
8b507be..9e3293b hotfix_read_spe_xml -> hotfix_read_spe_xml
grad09sh:tsphot harrold$ pwd
/Users/harrold/Documents/GitHub/ccd-utexas/tsphot
grad09sh:tsphot harrold$ ls
20150314T163000_troubleshoot_read_spe_xml.ipynb focus.py read_spe.py~
LICENSE lc_online2.py spe_30_header_format.csv
MANIFEST.in main.py spe_process.py
README.md read_spe.py test
fits_process.py read_spe.pyc utils.pyc
grad09sh:tsphot harrold$ pytest
^C^CTraceback (most recent call last):
File "/Users/harrold/anaconda/bin/pytest", line 6, in <module>
from logilab.common.pytest import run
File "/Users/harrold/anaconda/lib/python2.7/site-packages/logilab/common/pytest.py", line 126, in <module>
from logilab.common import testlib, STD_BLACKLIST
File "/Users/harrold/anaconda/lib/python2.7/site-packages/logilab/common/testlib.py", line 79, in <module>
from logilab.common.debugger import Debugger, colorize_source
File "/Users/harrold/anaconda/lib/python2.7/site-packages/logilab/common/debugger.py", line 47, in <module>
from IPython import PyColorize
File "/Users/harrold/anaconda/lib/python2.7/site-packages/IPython/__init__.py", line 48, in <module>
from .core.application import Application
File "/Users/harrold/anaconda/lib/python2.7/site-packages/IPython/core/application.py", line 19, in <module>
import shutil
KeyboardInterrupt
grad09sh:tsphot harrold$ pytest -v
going into /Users/harrold/Documents/GitHub/ccd-utexas/tsphot/test
========================= test_read_spe.py =========================
unhandled exception occurred while testing test_read_spe
Traceback (most recent call last):
File "/Users/harrold/anaconda/lib/python2.7/site-packages/logilab/common/pytest.py", line 440, in testfile
options=self.options, outstream=sys.stderr)
File "/Users/harrold/anaconda/lib/python2.7/site-packages/logilab/common/pytest.py", line 756, in __init__
testLoader=NonStrictTestLoader())
File "/Users/harrold/anaconda/lib/python2.7/unittest/main.py", line 77, in __init__
self.module = __import__(module)
File "test_read_spe.py", line 12, in <module>
import read_spe
ImportError: No module named read_spe
*******************************************************************************
Ran 1 test cases in 0.00s (0.00s CPU), 1 errors
0 modules OK (1 failed)
failures: /Users/harrold/Documents/GitHub/ccd-utexas/tsphot/test/test_read_spe [1/1]
grad09sh:tsphot harrold$ emacs test/test_read_spe.py
grad09sh:tsphot harrold$ git diff
diff --git a/test/test_read_spe.py b/test/test_read_spe.py
index aadb4d8..21dba87 100644
--- a/test/test_read_spe.py
+++ b/test/test_read_spe.py
@@ -8,7 +8,6 @@
from __future__ import absolute_import, division, print_function
import sys
-sys.path.insert(0, '.')
import read_spe
grad09sh:tsphot harrold$ pytest -v
going into /Users/harrold/Documents/GitHub/ccd-utexas/tsphot/test
========================= test_read_spe.py =========================
unhandled exception occurred while testing test_read_spe
Traceback (most recent call last):
File "/Users/harrold/anaconda/lib/python2.7/site-packages/logilab/common/pytest.py", line 440, in testfile
options=self.options, outstream=sys.stderr)
File "/Users/harrold/anaconda/lib/python2.7/site-packages/logilab/common/pytest.py", line 756, in __init__
testLoader=NonStrictTestLoader())
File "/Users/harrold/anaconda/lib/python2.7/unittest/main.py", line 77, in __init__
self.module = __import__(module)
File "test_read_spe.py", line 11, in <module>
import read_spe
ImportError: No module named read_spe
*******************************************************************************
Ran 1 test cases in 0.00s (0.00s CPU), 1 errors
0 modules OK (1 failed)
failures: /Users/harrold/Documents/GitHub/ccd-utexas/tsphot/test/test_read_spe [1/1]
grad09sh:tsphot harrold$ emacs test/test_read_spe.py
grad09sh:tsphot harrold$ ls
20150314T163000_troubleshoot_read_spe_xml.ipynb focus.py read_spe.py~
LICENSE lc_online2.py spe_30_header_format.csv
MANIFEST.in main.py spe_process.py
README.md read_spe.py test
fits_process.py read_spe.pyc utils.pyc
grad09sh:tsphot harrold$ pytest -v
going into /Users/harrold/Documents/GitHub/ccd-utexas/tsphot/test
========================= test_read_spe.py =========================
no test dir found testing here: /Users/harrold/Documents/GitHub/ccd-utexas/tsphot
*******************************************************************************
Ran 0 test cases in 1.78s (1.67s CPU)
All 1 modules OK
grad09sh:tsphot harrold$ emacs test/test_read_spe.py
You have new mail in /var/mail/harrold
grad09sh:tsphot harrold$ ls
20150314T163000_troubleshoot_read_spe_xml.ipynb focus.py read_spe.py~
LICENSE lc_online2.py spe_30_header_format.csv
MANIFEST.in main.py spe_process.py
README.md read_spe.py test
fits_process.py read_spe.pyc utils.pyc
grad09sh:tsphot harrold$ git mv test tests
grad09sh:tsphot harrold$ cd tests
grad09sh:tests harrold$ ls
aperture.pdf test_dark_20s 2014-05-20 21_45_44-Frame-2.fits
lc.pdf test_dark_20s 2014-05-20 21_45_44-Frame-3.fits
lightcurve.app test_dark_20s 2014-05-20 21_45_44-Frame-4.fits
phot_coords test_dark_20s 2014-05-20 21_45_44-Frame-5.fits
psf_fit.pdf test_dark_20s 2014-05-20 21_45_44.spe
test_bias 2014-05-20 22_00_21-Frame-1.fits test_footer.txt
test_bias 2014-05-20 22_00_21-Frame-2.fits test_footer.txt~
test_bias 2014-05-20 22_00_21-Frame-3.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits
test_bias 2014-05-20 22_00_21-Frame-4.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits
test_bias 2014-05-20 22_00_21-Frame-5.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits
test_bias 2014-05-20 22_00_21.spe test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits
test_bias_20140520.lfe test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits
test_dark_10s 2014-05-20 21_49_21-Frame-1.fits test_lightbox_10s 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-2.fits test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-3.fits test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-4.fits test_lightbox_20140520.lfe
test_dark_10s 2014-05-20 21_49_21-Frame-5.fits test_read_spe.py
test_dark_10s 2014-05-20 21_49_21.spe test_read_spe.pyc
test_dark_20140520.lfe test_read_spe.py~
test_dark_20s 2014-05-20 21_45_44-Frame-1.fits
grad09sh:tests harrold$ git rm aperture.pdf
error: the following file has changes staged in the index:
tests/aperture.pdf
(use --cached to keep the file, or -f to force removal)
grad09sh:tests harrold$ rm aperture.pdf
grad09sh:tests harrold$ git rm lc.pdf
error: the following file has changes staged in the index:
tests/lc.pdf
(use --cached to keep the file, or -f to force removal)
grad09sh:tests harrold$ rm lc.pdf
grad09sh:tests harrold$ git rm lightcurve.app
error: the following file has changes staged in the index:
tests/lightcurve.app
(use --cached to keep the file, or -f to force removal)
grad09sh:tests harrold$ git rm -f aperture.pdf
rm 'tests/aperture.pdf'
grad09sh:tests harrold$ git rm -f lc.pdf
rm 'tests/lc.pdf'
grad09sh:tests harrold$ git rm -f lightcurve.pdf
fatal: pathspec 'tests/lightcurve.pdf' did not match any files
grad09sh:tests harrold$ git rm -f phot_coords
rm 'tests/phot_coords'
grad09sh:tests harrold$ ls
lightcurve.app test_dark_20s 2014-05-20 21_45_44-Frame-3.fits
psf_fit.pdf test_dark_20s 2014-05-20 21_45_44-Frame-4.fits
test_bias 2014-05-20 22_00_21-Frame-1.fits test_dark_20s 2014-05-20 21_45_44-Frame-5.fits
test_bias 2014-05-20 22_00_21-Frame-2.fits test_dark_20s 2014-05-20 21_45_44.spe
test_bias 2014-05-20 22_00_21-Frame-3.fits test_footer.txt
test_bias 2014-05-20 22_00_21-Frame-4.fits test_footer.txt~
test_bias 2014-05-20 22_00_21-Frame-5.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits
test_bias 2014-05-20 22_00_21.spe test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits
test_bias_20140520.lfe test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits
test_dark_10s 2014-05-20 21_49_21-Frame-1.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits
test_dark_10s 2014-05-20 21_49_21-Frame-2.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits
test_dark_10s 2014-05-20 21_49_21-Frame-3.fits test_lightbox_10s 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-4.fits test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-5.fits test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21.spe test_lightbox_20140520.lfe
test_dark_20140520.lfe test_read_spe.py
test_dark_20s 2014-05-20 21_45_44-Frame-1.fits test_read_spe.pyc
test_dark_20s 2014-05-20 21_45_44-Frame-2.fits test_read_spe.py~
grad09sh:tests harrold$ git rm -f psf_fit.pdf
rm 'tests/psf_fit.pdf'
grad09sh:tests harrold$ ls
lightcurve.app test_dark_20s 2014-05-20 21_45_44-Frame-4.fits
test_bias 2014-05-20 22_00_21-Frame-1.fits test_dark_20s 2014-05-20 21_45_44-Frame-5.fits
test_bias 2014-05-20 22_00_21-Frame-2.fits test_dark_20s 2014-05-20 21_45_44.spe
test_bias 2014-05-20 22_00_21-Frame-3.fits test_footer.txt
test_bias 2014-05-20 22_00_21-Frame-4.fits test_footer.txt~
test_bias 2014-05-20 22_00_21-Frame-5.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits
test_bias 2014-05-20 22_00_21.spe test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits
test_bias_20140520.lfe test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits
test_dark_10s 2014-05-20 21_49_21-Frame-1.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits
test_dark_10s 2014-05-20 21_49_21-Frame-2.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits
test_dark_10s 2014-05-20 21_49_21-Frame-3.fits test_lightbox_10s 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-4.fits test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-5.fits test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21.spe test_lightbox_20140520.lfe
test_dark_20140520.lfe test_read_spe.py
test_dark_20s 2014-05-20 21_45_44-Frame-1.fits test_read_spe.pyc
test_dark_20s 2014-05-20 21_45_44-Frame-2.fits test_read_spe.py~
test_dark_20s 2014-05-20 21_45_44-Frame-3.fits
grad09sh:tests harrold$ git rm -f lightcurve.app
rm 'tests/lightcurve.app'
grad09sh:tests harrold$ ls
test_bias 2014-05-20 22_00_21-Frame-1.fits test_dark_20s 2014-05-20 21_45_44-Frame-4.fits
test_bias 2014-05-20 22_00_21-Frame-2.fits test_dark_20s 2014-05-20 21_45_44-Frame-5.fits
test_bias 2014-05-20 22_00_21-Frame-3.fits test_dark_20s 2014-05-20 21_45_44.spe
test_bias 2014-05-20 22_00_21-Frame-4.fits test_footer.txt
test_bias 2014-05-20 22_00_21-Frame-5.fits test_footer.txt~
test_bias 2014-05-20 22_00_21.spe test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits
test_bias_20140520.lfe test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits
test_dark_10s 2014-05-20 21_49_21-Frame-1.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits
test_dark_10s 2014-05-20 21_49_21-Frame-2.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits
test_dark_10s 2014-05-20 21_49_21-Frame-3.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits
test_dark_10s 2014-05-20 21_49_21-Frame-4.fits test_lightbox_10s 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-5.fits test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21.spe test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe
test_dark_20140520.lfe test_lightbox_20140520.lfe
test_dark_20s 2014-05-20 21_45_44-Frame-1.fits test_read_spe.py
test_dark_20s 2014-05-20 21_45_44-Frame-2.fits test_read_spe.pyc
test_dark_20s 2014-05-20 21_45_44-Frame-3.fits test_read_spe.py~
grad09sh:tests harrold$ git rm -f test_footer.txt
rm 'tests/test_footer.txt'
grad09sh:tests harrold$ git rm -f test_footer.txt~
fatal: pathspec 'tests/test_footer.txt~' did not match any files
grad09sh:tests harrold$ rm test_footer.txt~
grad09sh:tests harrold$ git mkdir data
git: 'mkdir' is not a git command. See 'git --help'.
grad09sh:tests harrold$ mkdir data
grad09sh:tests harrold$ git mv test_* data/.
fatal: not under version control, source=tests/test_read_spe.pyc, destination=tests/data/test_read_spe.pyc
grad09sh:tests harrold$ ls
data test_dark_20s 2014-05-20 21_45_44-Frame-3.fits
test_bias 2014-05-20 22_00_21-Frame-1.fits test_dark_20s 2014-05-20 21_45_44-Frame-4.fits
test_bias 2014-05-20 22_00_21-Frame-2.fits test_dark_20s 2014-05-20 21_45_44-Frame-5.fits
test_bias 2014-05-20 22_00_21-Frame-3.fits test_dark_20s 2014-05-20 21_45_44.spe
test_bias 2014-05-20 22_00_21-Frame-4.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits
test_bias 2014-05-20 22_00_21-Frame-5.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits
test_bias 2014-05-20 22_00_21.spe test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits
test_bias_20140520.lfe test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits
test_dark_10s 2014-05-20 21_49_21-Frame-1.fits test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits
test_dark_10s 2014-05-20 21_49_21-Frame-2.fits test_lightbox_10s 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-3.fits test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-4.fits test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe
test_dark_10s 2014-05-20 21_49_21-Frame-5.fits test_lightbox_20140520.lfe
test_dark_10s 2014-05-20 21_49_21.spe test_read_spe.py
test_dark_20140520.lfe test_read_spe.pyc
test_dark_20s 2014-05-20 21_45_44-Frame-1.fits test_read_spe.py~
test_dark_20s 2014-05-20 21_45_44-Frame-2.fits
grad09sh:tests harrold$ rm test_read_spe.pyc
grad09sh:tests harrold$ rm test_read_spe.py~
grad09sh:tests harrold$ git mv test_* data/.
grad09sh:tests harrold$ ls
data
grad09sh:tests harrold$ ls data/*.py
data/test_read_spe.py
grad09sh:tests harrold$ git mv data/test_read_spe.py .
grad09sh:tests harrold$ ls
data test_read_spe.py
grad09sh:tests harrold$ git diff
diff --git a/tests/test_read_spe.py b/tests/test_read_spe.py
index aadb4d8..4b2feae 100644
--- a/tests/test_read_spe.py
+++ b/tests/test_read_spe.py
@@ -8,13 +8,20 @@
from __future__ import absolute_import, division, print_function
import sys
-sys.path.insert(0, '.')
+sys.path.insert(0, '..')
import read_spe
+import pdb
-def test_read_spe_load_footer_metadata(fname='test_lightbox_10s 2014-05-20 21_56_08.spe', fname_footer='test_footer.txt'):
+def test_read_spe_load_footer_metadata(fname_spe='test_lightbox_10s 2014-05-20 21_56_08.spe',
+ xml_first_40=r'<SpeFormat version="3.0" xmlns="http://w',
+ xml_last_40=r'39Z" /></GeneralInformation></SpeFormat>'):
"""pytest style test for read_spe.File._load_footer_metadata
"""
- assert read_spe.File(fname=fname).footer_metadata == open(fname_footer, 'rb').read().strip()
+ footer_metadata = read_spe.File(fname=fname_spe).footer_metadata
+ assert footer_metadata[:40] == xml_first_40
+ assert footer_metadata[-40:] == xml_last_40
return None
+
+
grad09sh:tests harrold$ git commit -am "tests: reorg. ref #108, ref #102"
[hotfix_read_spe_xml 72377b7] tests: reorg. ref #108, ref #102
37 files changed, 27 insertions(+), 116 deletions(-)
delete mode 100644 test/aperture.pdf
delete mode 100644 test/lc.pdf
delete mode 100644 test/lightcurve.app
delete mode 100644 test/phot_coords
delete mode 100644 test/psf_fit.pdf
delete mode 100644 test/test_footer.txt
delete mode 100644 test/test_read_spe.py
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-1.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-2.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-3.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-4.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-5.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21.spe (100%)
rename {test => tests/data}/test_bias_20140520.lfe (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-1.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-2.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-3.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-4.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-5.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21.spe (100%)
rename {test => tests/data}/test_dark_20140520.lfe (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-1.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-2.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-3.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-4.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-5.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44.spe (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_20140520.lfe (100%)
create mode 100644 tests/test_read_spe.py
grad09sh:tests harrold$ git push origin hotfix_read_spe_xml
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.59 KiB | 0 bytes/s, done.
Total 5 (delta 1), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
9e3293b..72377b7 hotfix_read_spe_xml -> hotfix_read_spe_xml
grad09sh:tests harrold$ cd ..
grad09sh:tsphot harrold$ pytest -v
going into /Users/harrold/Documents/GitHub/ccd-utexas/tsphot/tests
========================= test_read_spe.py =========================
no test dir found testing here: /Users/harrold/Documents/GitHub/ccd-utexas/tsphot
*******************************************************************************
Ran 0 test cases in 1.76s (1.67s CPU)
All 1 modules OK
grad09sh:tsphot harrold$ emacs tests/test_read_spe.py
grad09sh:tsphot harrold$ pwd
/Users/harrold/Documents/GitHub/ccd-utexas/tsphot
grad09sh:tsphot harrold$ ls
20150314T163000_troubleshoot_read_spe_xml.ipynb focus.py read_spe.py~
LICENSE lc_online2.py spe_30_header_format.csv
MANIFEST.in main.py spe_process.py
README.md read_spe.py tests
fits_process.py read_spe.pyc utils.pyc
grad09sh:tsphot harrold$ py.test -v
================================================================= test session starts ==================================================================
platform darwin -- Python 2.7.9 -- py-1.4.26 -- pytest-2.6.4 -- /Users/harrold/anaconda/bin/python
collected 1 items
tests/test_read_spe.py::test_read_spe_load_footer_metadata PASSED
=============================================================== 1 passed in 2.02 seconds ===============================================================
grad09sh:tsphot harrold$
grad09sh:tsphot harrold$ # woohoo it works :)
grad09sh:tsphot harrold$ git commit -am "tests: finished pytest and reorg. ref #108, ref #102"
[hotfix_read_spe_xml 349a4f3] tests: finished pytest and reorg. ref #108, ref #102
1 file changed, 3 insertions(+), 3 deletions(-)
grad09sh:tsphot harrold$ git push origin hotfix_read_spe_xml
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 432 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
72377b7..349a4f3 hotfix_read_spe_xml -> hotfix_read_spe_xml
grad09sh:tsphot harrold$ # NOTE: call pytest with `py.test`, not `pytest`. see http://pytest.org/latest/usage.html
grad09sh:tsphot harrold$ git diff
grad09sh:tsphot harrold$ ls
20150314T163000_troubleshoot_read_spe_xml.ipynb focus.py read_spe.py~
LICENSE lc_online2.py spe_30_header_format.csv
MANIFEST.in main.py spe_process.py
README.md read_spe.py tests
fits_process.py read_spe.pyc utils.pyc
grad09sh:tsphot harrold$ touch tests/test_read_spe.py
grad09sh:tsphot harrold$ git status
# On branch hotfix_read_spe_xml
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .ipynb_checkpoints/
# 20150314T163000_troubleshoot_read_spe_xml.ipynb
nothing added to commit but untracked files present (use "git add" to track)
grad09sh:tsphot harrold$ open .
grad09sh:tsphot harrold$ emacs tests/test_read_spe.py
grad09sh:tsphot harrold$ git commit -am "tests: closes #108, ref #102"
[hotfix_read_spe_xml 7335c79] tests: closes #108, ref #102
1 file changed, 1 deletion(-)
grad09sh:tsphot harrold$ git push origin hotfix_read_spe_xml
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 379 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
349a4f3..7335c79 hotfix_read_spe_xml -> hotfix_read_spe_xml
grad09sh:tsphot harrold$ # back to following http://nvie.com/posts/a-successful-git-branching-model/
grad09sh:tsphot harrold$ git status
# On branch hotfix_read_spe_xml
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .ipynb_checkpoints/
nothing added to commit but untracked files present (use "git add" to track)
grad09sh:tsphot harrold$ git branch
develop
gh-pages
* hotfix_read_spe_xml
master
pipeline
grad09sh:tsphot harrold$ git checkout master
Switched to branch 'master'
grad09sh:tsphot harrold$ git merge --no-ff hotfix_read_spe_xml
Removing test/psf_fit.pdf
Removing test/phot_coords
Removing test/lightcurve.app
Removing test/lc.pdf
Removing test/aperture.pdf
Merge made by the 'recursive' strategy.
read_spe.py | 32 ++++++++++++++++-----
test/aperture.pdf | Bin 11960 -> 0 bytes
test/lc.pdf | Bin 28771 -> 0 bytes
test/lightcurve.app | 92 -------------------------------------------------------------
test/phot_coords | 3 --
test/psf_fit.pdf | Bin 13814 -> 0 bytes
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-1.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-2.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-3.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-4.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-5.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21.spe | Bin
{test => tests/data}/test_bias_20140520.lfe | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-1.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-2.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-3.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-4.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-5.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21.spe | Bin
{test => tests/data}/test_dark_20140520.lfe | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-1.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-2.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-3.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-4.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-5.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44.spe | Bin
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08.spe | Bin
{test => tests/data}/test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe | Bin
{test => tests/data}/test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe | Bin
{test => tests/data}/test_lightbox_20140520.lfe | 0
tests/test_read_spe.py | 26 +++++++++++++++++
36 files changed, 51 insertions(+), 102 deletions(-)
delete mode 100644 test/aperture.pdf
delete mode 100644 test/lc.pdf
delete mode 100644 test/lightcurve.app
delete mode 100644 test/phot_coords
delete mode 100644 test/psf_fit.pdf
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-1.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-2.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-3.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-4.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-5.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21.spe (100%)
rename {test => tests/data}/test_bias_20140520.lfe (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-1.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-2.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-3.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-4.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-5.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21.spe (100%)
rename {test => tests/data}/test_dark_20140520.lfe (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-1.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-2.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-3.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-4.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-5.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44.spe (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_20140520.lfe (100%)
create mode 100644 tests/test_read_spe.py
grad09sh:tsphot harrold$ git push origin master
Counting objects: 1, done.
Writing objects: 100% (1/1), 232 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
517ee3f..9ed590c master -> master
grad09sh:tsphot harrold$ git branch
develop
gh-pages
hotfix_read_spe_xml
* master
pipeline
grad09sh:tsphot harrold$ git branch -d hotfix_read_spe_xml
Deleted branch hotfix_read_spe_xml (was 7335c79).
grad09sh:tsphot harrold$ # now update changes to develop then pipeline
grad09sh:tsphot harrold$ git branch
develop
gh-pages
* master
pipeline
grad09sh:tsphot harrold$ # deleted hotfix branch locally. also delete on github: https://github.com/ccd-utexas/tsphot/branches
grad09sh:tsphot harrold$ # now updating develop then pipeline
grad09sh:tsphot harrold$ git checkout pipeline
Switched to branch 'pipeline'
Your branch is behind 'origin/pipeline' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
grad09sh:tsphot harrold$ git pull
Updating 9863d19..67bfed5
Fast-forward
README.md | 46 +++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 43 insertions(+), 3 deletions(-)
grad09sh:tsphot harrold$ git checkout develop
Switched to branch 'develop'
grad09sh:tsphot harrold$ git pull
Already up-to-date.
grad09sh:tsphot harrold$ # first made sure that they were up to date
grad09sh:tsphot harrold$ git status
# On branch develop
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .ipynb_checkpoints/
nothing added to commit but untracked files present (use "git add" to track)
grad09sh:tsphot harrold$ rm -rf .ipynb_checkpoints
grad09sh:tsphot harrold$ jobs
[1]+ Running ipython notebook --quiet &
grad09sh:tsphot harrold$ kill %1
grad09sh:tsphot harrold$ [C 12:21:44.529 NotebookApp] received signal 15, stopping
[1]+ Terminated: 15 ipython notebook --quiet
grad09sh:tsphot harrold$ # stopped my ipynb
grad09sh:tsphot harrold$ git status
# On branch develop
nothing to commit, working directory clean
grad09sh:tsphot harrold$ git merge --no-ff master
Removing test/psf_fit.pdf
Removing test/phot_coords
Removing test/lightcurve.app
Removing test/lc.pdf
Removing test/aperture.pdf
Auto-merging read_spe.py
Merge made by the 'recursive' strategy.
read_spe.py | 31 ++++++++++++++++-----
test/aperture.pdf | Bin 11960 -> 0 bytes
test/lc.pdf | Bin 28771 -> 0 bytes
test/lightcurve.app | 92 -------------------------------------------------------------
test/phot_coords | 3 --
test/psf_fit.pdf | Bin 13814 -> 0 bytes
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-1.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-2.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-3.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-4.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-5.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21.spe | Bin
{test => tests/data}/test_bias_20140520.lfe | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-1.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-2.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-3.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-4.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-5.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21.spe | Bin
{test => tests/data}/test_dark_20140520.lfe | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-1.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-2.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-3.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-4.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-5.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44.spe | Bin
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08.spe | Bin
{test => tests/data}/test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe | Bin
{test => tests/data}/test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe | Bin
{test => tests/data}/test_lightbox_20140520.lfe | 0
tests/test_read_spe.py | 26 +++++++++++++++++
36 files changed, 50 insertions(+), 102 deletions(-)
delete mode 100644 test/aperture.pdf
delete mode 100644 test/lc.pdf
delete mode 100644 test/lightcurve.app
delete mode 100644 test/phot_coords
delete mode 100644 test/psf_fit.pdf
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-1.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-2.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-3.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-4.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-5.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21.spe (100%)
rename {test => tests/data}/test_bias_20140520.lfe (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-1.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-2.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-3.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-4.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-5.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21.spe (100%)
rename {test => tests/data}/test_dark_20140520.lfe (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-1.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-2.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-3.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-4.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-5.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44.spe (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_20140520.lfe (100%)
create mode 100644 tests/test_read_spe.py
grad09sh:tsphot harrold$ git push origin develop
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 752 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
cad150c..5010341 develop -> develop
grad09sh:tsphot harrold$ git checkout pipeline
Switched to branch 'pipeline'
grad09sh:tsphot harrold$ git merge --no-ff develop
Removing test/psf_fit.pdf
Removing test/phot_coords
Removing test/lightcurve.app
Removing test/lc.pdf
Removing test/aperture.pdf
Merge made by the 'recursive' strategy.
read_spe.py | 31 ++++++++++++++++-----
test/aperture.pdf | Bin 11960 -> 0 bytes
test/lc.pdf | Bin 28771 -> 0 bytes
test/lightcurve.app | 92 -------------------------------------------------------------
test/phot_coords | 3 --
test/psf_fit.pdf | Bin 13814 -> 0 bytes
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-1.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-2.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-3.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-4.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-5.fits | 0
{test => tests/data}/test_bias 2014-05-20 22_00_21.spe | Bin
{test => tests/data}/test_bias_20140520.lfe | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-1.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-2.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-3.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-4.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-5.fits | 0
{test => tests/data}/test_dark_10s 2014-05-20 21_49_21.spe | Bin
{test => tests/data}/test_dark_20140520.lfe | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-1.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-2.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-3.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-4.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-5.fits | 0
{test => tests/data}/test_dark_20s 2014-05-20 21_45_44.spe | Bin
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits | 0
{test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08.spe | Bin
{test => tests/data}/test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe | Bin
{test => tests/data}/test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe | Bin
{test => tests/data}/test_lightbox_20140520.lfe | 0
tests/test_read_spe.py | 26 +++++++++++++++++
36 files changed, 50 insertions(+), 102 deletions(-)
delete mode 100644 test/aperture.pdf
delete mode 100644 test/lc.pdf
delete mode 100644 test/lightcurve.app
delete mode 100644 test/phot_coords
delete mode 100644 test/psf_fit.pdf
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-1.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-2.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-3.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-4.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21-Frame-5.fits (100%)
rename {test => tests/data}/test_bias 2014-05-20 22_00_21.spe (100%)
rename {test => tests/data}/test_bias_20140520.lfe (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-1.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-2.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-3.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-4.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21-Frame-5.fits (100%)
rename {test => tests/data}/test_dark_10s 2014-05-20 21_49_21.spe (100%)
rename {test => tests/data}/test_dark_20140520.lfe (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-1.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-2.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-3.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-4.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44-Frame-5.fits (100%)
rename {test => tests/data}/test_dark_20s 2014-05-20 21_45_44.spe (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-1.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-2.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-3.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-4.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08-Frame-5.fits (100%)
rename {test => tests/data}/test_lightbox_10s 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_10s_no_footer 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_10s_no_frames_no_footer 2014-05-20 21_56_08.spe (100%)
rename {test => tests/data}/test_lightbox_20140520.lfe (100%)
create mode 100644 tests/test_read_spe.py
grad09sh:tsphot harrold$ git push origin pipeline
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 296 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To https://github.com/ccd-utexas/tsphot.git
67bfed5..44aa1b3 pipeline -> pipeline
grad09sh:tsphot harrold$ # check that the tests still work
grad09sh:tsphot harrold$ pwd
/Users/harrold/Documents/GitHub/ccd-utexas/tsphot
grad09sh:tsphot harrold$ ls
BACKUP __init__.py reduce_config.json utils.pyc
CONTRIBUTING.md main.py spe_30_header_format.csv verify_timestamps.py
LICENSE read_spe.py test
MANIFEST.in read_spe.pyc tests
README.md read_spe.py~ utils.py
grad09sh:tsphot harrold$ py.test -v
================================================================= test session starts ==================================================================
platform darwin -- Python 2.7.9 -- py-1.4.26 -- pytest-2.6.4 -- /Users/harrold/anaconda/bin/python
collected 1 items
tests/test_read_spe.py::test_read_spe_load_footer_metadata PASSED
=============================================================== 1 passed in 2.56 seconds ===============================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment