This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
"""Use itertools.groupby() to split a series of numbers into sub-itervals. | |
For each interval, all its elements satisfy (x_{i} - x_{0}) < WINDOW. | |
Keys to this approach: | |
- We need a global variable to keep track of the current x_{0}. | |
- The key value of each element is x_{0} (so that all the elements fall into the same group). | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Author: Victor Terron (c) 2015 | |
# Email: `echo vt2rron1iaa32s | tr 132 @.e` | |
# License: GNU GPLv3 | |
from __future__ import division | |
from __future__ import print_function | |
from __future__ import absolute_import | |
from __future__ import unicode_literals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Author: Victor Terron (c) 2015 | |
# Email: `echo vt2rron1iaa32s | tr 132 @.e` | |
# License: GNU GPLv3 | |
from __future__ import division | |
from __future__ import print_function | |
from __future__ import absolute_import | |
from __future__ import unicode_literals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
""" See this URL for an explanation of what we're doing here: | |
https://wthwdik.wordpress.com/2007/08/30/an-unbounded-sieve-of-eratosthenes/ | |
""" | |
import itertools | |
import types | |
class Prime(types.SimpleNamespace): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Author: Victor Terron (c) 2015 | |
# Email: `echo vt2rron1iaa32s | tr 132 @.e` | |
# License: GNU GPLv3 | |
""" Mosaic a series of input FITS images with montage.mosaic(), using | |
bitpix=-64 (double precision floating point). Both the input and output | |
temporary directories are immediately removed when the function exits. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
""" Take a LEMONdB file and print to standard output the right ascension and | |
declination of all the astronomical objects. """ | |
# Author: Victor Terron (c) 2015 | |
# Email: `echo vt2rron1iaa32s | tr 132 @.e` | |
# License: GNU GPLv3 | |
from __future__ import division |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Author: Victor Terron (c) 2015 | |
# Email: `echo vt2rron1iaa32s | tr 132 @.e` | |
# License: GNU GPLv3 | |
""" Mosaic all the input FITS files using Montage, then all of them except for | |
the first ten, then all of them minus the first twenty, et cetera. That is: the | |
number of mosaicked images decreases in steps of ten. We stop as soon as one of | |
the data sets doesn't cause Montage to raise an error. .""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Author: Victor Terron (c) 2015 | |
# Email: `echo vt2rron1iaa32s | tr 132 @.e` | |
# License: GNU GPLv3 | |
""" Mosaic the first ten FITS files using Montage, then the first twenty, then | |
the first thirty, et cetera. That is: the number of mosaicked images increases | |
in steps of ten, stopping as soon as an error, if any, is encountered.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Author: Victor Terron (c) 2015 | |
# Email: `echo vt2rron1iaa32s | tr 132 @.e` | |
# License: GNU GPLv3 | |
""" Feed a series of input FITS files to Montage (via montage-wrapper), | |
one by one, identifying those, if any, that cause it to raise an error. """ | |
from __future__ import division |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100.1191901 9.8177770 |
NewerOlder