From jturner at gemini.edu Tue May 6 13:29:14 2014 From: jturner at gemini.edu (James Turner) Date: Tue, 6 May 2014 13:29:14 -0400 Subject: [AstroPy] PyFU datacube mosaicking package Message-ID: <53691BEA.9060504@gemini.edu> Hello, I've finally got around to posting my IFU datacube mosaicking scripts at http://drforum.gemini.edu/topic/pyfu-datacube-mosaicking-package/. This was actually written (some years ago) more as an IRAF-style PyRAF package to complement the Gemini scripts than as a Python user module and currently doesn't have a well-documented Python interface or setup.py etc. but it may be useful to people nonetheless and can be fixed up if there's demand. I'd rather focus any more serious effort, however, on getting the underlying functionality into AstroPy; this code is built on a somewhat-incomplete, experimental data access class from ~8 years ago (my first non-trivial Python code) that really ought to be replaced by nddata & gWCS at this point. I'm curious whether there's any news on the datacube package that Sophia Lianou posted about last October? Cheers, James. From beaumont at hawaii.edu Tue May 6 19:58:50 2014 From: beaumont at hawaii.edu (Chris Beaumont) Date: Tue, 6 May 2014 16:58:50 -0700 Subject: [AstroPy] Spherical point in polygon test? Message-ID: What's the easiest way to compute whether a set of lat/lon points is inside a spherical quad on the sky? This package claims to do it, but I can't seem to find a good place to download the source http://ssb.stsci.edu/doc/stsci_python_dev/stsci.sphere.doc/html/ Ideas? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From cslocum at stsci.edu Tue May 6 20:10:44 2014 From: cslocum at stsci.edu (Christine Slocum) Date: Wed, 7 May 2014 00:10:44 +0000 Subject: [AstroPy] Spherical point in polygon test? In-Reply-To: References: Message-ID: <70621912E37CB34F855F6EA387CF0202222DD6E9@EXCHMAIL2.stsci.edu> I can't answer the first question, but you can find the source here: https://svn.stsci.edu/svn/ssb/stsci_python/stsci.sphere/trunk/ Christine ________________________________ From: astropy-bounces at scipy.org [astropy-bounces at scipy.org] on behalf of Chris Beaumont [beaumont at hawaii.edu] Sent: Tuesday, May 06, 2014 7:58 PM To: astropy Subject: [AstroPy] Spherical point in polygon test? What's the easiest way to compute whether a set of lat/lon points is inside a spherical quad on the sky? This package claims to do it, but I can't seem to find a good place to download the source http://ssb.stsci.edu/doc/stsci_python_dev/stsci.sphere.doc/html/ Ideas? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjk at uvic.ca Tue May 6 20:36:01 2014 From: jjk at uvic.ca (JJ Kavelaars) Date: Tue, 6 May 2014 17:36:01 -0700 Subject: [AstroPy] Spherical point in polygon test? In-Reply-To: <70621912E37CB34F855F6EA387CF0202222DD6E9@EXCHMAIL2.stsci.edu> References: <70621912E37CB34F855F6EA387CF0202222DD6E9@EXCHMAIL2.stsci.edu> Message-ID: https://pypi.python.org/pypi/Polygon/2.0.4 Or version 3 if you are python3. Works well. Has reasonable set of geometric functions. CONTAINs and OVERLAPs IIRC. I use this a few times a year. JJ > On May 6, 2014, at 5:10 PM, Christine Slocum wrote: > > I can't answer the first question, but you can find the source here: > > https://svn.stsci.edu/svn/ssb/stsci_python/stsci.sphere/trunk/ > > Christine > > From: astropy-bounces at scipy.org [astropy-bounces at scipy.org] on behalf of Chris Beaumont [beaumont at hawaii.edu] > Sent: Tuesday, May 06, 2014 7:58 PM > To: astropy > Subject: [AstroPy] Spherical point in polygon test? > > What's the easiest way to compute whether a set of lat/lon points is inside a spherical quad on the sky? > > This package claims to do it, but I can't seem to find a good place to download the source > http://ssb.stsci.edu/doc/stsci_python_dev/stsci.sphere.doc/html/ > > Ideas? > Chris > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdroe at stsci.edu Wed May 7 08:09:09 2014 From: mdroe at stsci.edu (Michael Droettboom) Date: Wed, 7 May 2014 08:09:09 -0400 Subject: [AstroPy] Spherical point in polygon test? In-Reply-To: References: <70621912E37CB34F855F6EA387CF0202222DD6E9@EXCHMAIL2.stsci.edu> Message-ID: <536A2265.1010805@stsci.edu> The Polygon package is for 2D, not spherical, polygons. Sometimes the approximation doesn't matter, and you can project from one into the other, preserving area etc. However, in some cases it's important to stay in spherical space, particularly when the polygon is large or the extent of it isn't known up front (for example, when doing mosaicing from a large database of images). I'm the author of the stsci.sphere package, which does work with spherical polygons in vector space natively. With it, you can do: ``` >>> from sphere import SphericalPolygon >>> from sphere import vector >>> polygon = SphericalPolygon.from_radec(...) >>> x, y, z = vector.radec_to_vector(...) >>> polygon.point_inside(x, y, z) ``` Mike On 05/06/2014 08:36 PM, JJ Kavelaars wrote: > https://pypi.python.org/pypi/Polygon/2.0.4 > > Or version 3 if you are python3. Works well. Has reasonable set of > geometric functions. CONTAINs and OVERLAPs IIRC. I use this a few > times a year. > > JJ > > On May 6, 2014, at 5:10 PM, Christine Slocum > wrote: > >> I can't answer the first question, but you can find the source here: >> >> https://svn.stsci.edu/svn/ssb/stsci_python/stsci.sphere/trunk/ >> >> Christine >> >> ------------------------------------------------------------------------ >> *From:* astropy-bounces at scipy.org >> [astropy-bounces at scipy.org ] on >> behalf of Chris Beaumont [beaumont at hawaii.edu >> ] >> *Sent:* Tuesday, May 06, 2014 7:58 PM >> *To:* astropy >> *Subject:* [AstroPy] Spherical point in polygon test? >> >> What's the easiest way to compute whether a set of lat/lon points is >> inside a spherical quad on the sky? >> >> This package claims to do it, but I can't seem to find a good place >> to download the source >> http://ssb.stsci.edu/doc/stsci_python_dev/stsci.sphere.doc/html/ >> >> Ideas? >> Chris >> _______________________________________________ >> AstroPy mailing list >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy -- Michael Droettboom Science Software Branch Space Telescope Science Institute http://www.droettboom.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From john.parejko at yale.edu Wed May 7 10:20:56 2014 From: john.parejko at yale.edu (John K. Parejko) Date: Wed, 7 May 2014 10:20:56 -0400 Subject: [AstroPy] Spherical point in polygon test? In-Reply-To: <536A2265.1010805@stsci.edu> References: <70621912E37CB34F855F6EA387CF0202222DD6E9@EXCHMAIL2.stsci.edu> <536A2265.1010805@stsci.edu> Message-ID: <5DA6F601-DF6C-4746-A25C-E2078BB5DFDD@yale.edu> Though a bit less general, there is also the the manglepy module for dealing with mangle polygon masks: https://github.com/mollyswanson/manglepy based off of: http://space.mit.edu/~molly/mangle John On 7May 2014, at 08:09, Michael Droettboom wrote: > The Polygon package is for 2D, not spherical, polygons. Sometimes the approximation doesn't matter, and you can project from one into the other, preserving area etc. However, in some cases it's important to stay in spherical space, particularly when the polygon is large or the extent of it isn't known up front (for example, when doing mosaicing from a large database of images). > > I'm the author of the stsci.sphere package, which does work with spherical polygons in vector space natively. > > With it, you can do: > > ``` > >>> from sphere import SphericalPolygon > >>> from sphere import vector > >>> polygon = SphericalPolygon.from_radec(...) > >>> x, y, z = vector.radec_to_vector(...) > >>> polygon.point_inside(x, y, z) > ``` > > Mike > > On 05/06/2014 08:36 PM, JJ Kavelaars wrote: >> https://pypi.python.org/pypi/Polygon/2.0.4 >> >> Or version 3 if you are python3. Works well. Has reasonable set of geometric functions. CONTAINs and OVERLAPs IIRC. I use this a few times a year. >> >> JJ >> >> On May 6, 2014, at 5:10 PM, Christine Slocum wrote: >> >>> I can't answer the first question, but you can find the source here: >>> >>> https://svn.stsci.edu/svn/ssb/stsci_python/stsci.sphere/trunk/ >>> >>> Christine >>> >>> From: astropy-bounces at scipy.org [astropy-bounces at scipy.org] on behalf of Chris Beaumont [beaumont at hawaii.edu] >>> Sent: Tuesday, May 06, 2014 7:58 PM >>> To: astropy >>> Subject: [AstroPy] Spherical point in polygon test? >>> >>> What's the easiest way to compute whether a set of lat/lon points is inside a spherical quad on the sky? >>> >>> This package claims to do it, but I can't seem to find a good place to download the source >>> http://ssb.stsci.edu/doc/stsci_python_dev/stsci.sphere.doc/html/ >>> >>> Ideas? >>> Chris >>> _______________________________________________ >>> AstroPy mailing list >>> AstroPy at scipy.org >>> http://mail.scipy.org/mailman/listinfo/astropy >> >> >> _______________________________________________ >> AstroPy mailing list >> >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy > > > -- > Michael Droettboom > Science Software Branch > Space Telescope Science Institute > > > http://www.droettboom.com > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy -- ************************* John Parejko john.parejko at yale.edu http://www.astro.yale.edu/~jp727/ 203 432-9759 JWG 465 Department of Physics Yale University New Haven, CT ************************** From beaumont at hawaii.edu Wed May 7 13:53:39 2014 From: beaumont at hawaii.edu (Chris Beaumont) Date: Wed, 7 May 2014 10:53:39 -0700 Subject: [AstroPy] Spherical point in polygon test? In-Reply-To: <536A2265.1010805@stsci.edu> References: <70621912E37CB34F855F6EA387CF0202222DD6E9@EXCHMAIL2.stsci.edu> <536A2265.1010805@stsci.edu> Message-ID: Thanks everyone. Mike is right that I need something that handles spherical geometry correctly and, once Christine pointed me to a source URL, the stsci.sphere package works well. Two followup questions: - Should stsci.sphere be on PyPI? It appears to be a blank upload at the moment https://pypi.python.org/pypi/stsci.sphere - Can stsci.sphere (or scikit learn, or something else) be used to do efficient nearest neighbor searches? Thanks, Chris On Wed, May 7, 2014 at 5:09 AM, Michael Droettboom wrote: > The Polygon package is for 2D, not spherical, polygons. Sometimes the > approximation doesn't matter, and you can project from one into the other, > preserving area etc. However, in some cases it's important to stay in > spherical space, particularly when the polygon is large or the extent of it > isn't known up front (for example, when doing mosaicing from a large > database of images). > > I'm the author of the stsci.sphere package, which does work with spherical > polygons in vector space natively. > > With it, you can do: > > ``` > >>> from sphere import SphericalPolygon > >>> from sphere import vector > >>> polygon = SphericalPolygon.from_radec(...) > >>> x, y, z = vector.radec_to_vector(...) > >>> polygon.point_inside(x, y, z) > ``` > > Mike > > > On 05/06/2014 08:36 PM, JJ Kavelaars wrote: > > https://pypi.python.org/pypi/Polygon/2.0.4 > > Or version 3 if you are python3. Works well. Has reasonable set of > geometric functions. CONTAINs and OVERLAPs IIRC. I use this a few times a > year. > > JJ > > On May 6, 2014, at 5:10 PM, Christine Slocum wrote: > > I can't answer the first question, but you can find the source here: > > https://svn.stsci.edu/svn/ssb/stsci_python/stsci.sphere/trunk/ > > Christine > > ------------------------------ > *From:* astropy-bounces at scipy.org [astropy-bounces at scipy.org] on behalf > of Chris Beaumont [beaumont at hawaii.edu] > *Sent:* Tuesday, May 06, 2014 7:58 PM > *To:* astropy > *Subject:* [AstroPy] Spherical point in polygon test? > > What's the easiest way to compute whether a set of lat/lon points is > inside a spherical quad on the sky? > > This package claims to do it, but I can't seem to find a good place to > download the source > http://ssb.stsci.edu/doc/stsci_python_dev/stsci.sphere.doc/html/ > > Ideas? > Chris > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > > > _______________________________________________ > AstroPy mailing listAstroPy at scipy.orghttp://mail.scipy.org/mailman/listinfo/astropy > > > > -- > Michael Droettboom > Science Software Branch > Space Telescope Science Institute > http://www.droettboom.com > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -- ************************************* Chris Beaumont Senior Software Engineer Harvard Center for Astrophysics 60 Garden Street, MS 42 Cambridge, MA 02138 chrisbeaumont.org ************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From hong at topbug.net Thu May 8 05:38:27 2014 From: hong at topbug.net (Hong Xu) Date: Thu, 08 May 2014 02:38:27 -0700 Subject: [AstroPy] write ascii table without the head row Message-ID: <536B5093.4020506@topbug.net> Hi, Is it possible to write an ascii table without the head row, i.e. the row containing the name of the columns? Thanks! Hong From thomas.robitaille at gmail.com Thu May 8 07:45:34 2014 From: thomas.robitaille at gmail.com (Thomas Robitaille) Date: Thu, 08 May 2014 13:45:34 +0200 Subject: [AstroPy] Lorentz Center Workshop on "Python in Astronomy" Message-ID: <536B6E5E.3000200@gmail.com> Hi everyone, Back in December last year I forwarded a call for proposals for workshops at the Lorentz center to this list, and a few of us subsequently put in an application to hold a Python Astronomy workshop. We are now very happy to report that a "Python in Astronomy" workshop has been accepted and will take place at the Lorentz center in Leiden on 20-24 April 2015. This workshop aims to bring together researchers, Python developers, users, and educators, and will include presentations, tutorials, unconference sessions, and coding sprints. In addition to sharing information about the state-of-the art of Python Astronomy packages, the workshop will also focus on improving interoperability between astronomical Python packages, providing training for new contributors, and developing a common set of educational materials for Python in Astronomy. The meeting is therefore not only aimed at current developers, but also users and educators. A formal website and announcement will come later this year, but we wanted to share this with you now so that you can keep the dates free if you are interested in participating. In the mean time, you can already sign up to receive future announcements about the workshop at the following page: http://python-in-astronomy.github.io Please feel free to spread the word to others that this is happening and get them to sign up to the announcement list. We are very excited about the opportunity to hold this workshop, and we hope to see many of you there! The organizing committee: Thomas Robitaille Pauline Barmby Eric Jeschke Stuart Mumford Magnus Persson From aldcroft at head.cfa.harvard.edu Thu May 8 09:49:39 2014 From: aldcroft at head.cfa.harvard.edu (Aldcroft, Thomas) Date: Thu, 8 May 2014 09:49:39 -0400 Subject: [AstroPy] write ascii table without the head row In-Reply-To: <536B5093.4020506@topbug.net> References: <536B5093.4020506@topbug.net> Message-ID: Assuming you have an astropy Table named `table`, you can do: >>> from astropy.io import ascii >>> ascii.write(table, filename, format='no_header') or >>> table.write(filename, format='ascii.no_header') - Tom On Thu, May 8, 2014 at 5:38 AM, Hong Xu wrote: > Hi, > > Is it possible to write an ascii table without the head row, i.e. the > row containing the name of the columns? > > Thanks! > Hong > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From harrold at astro.as.utexas.edu Thu May 8 19:25:35 2014 From: harrold at astro.as.utexas.edu (Samuel Harrold) Date: Thu, 8 May 2014 18:25:35 -0500 Subject: [AstroPy] astropy with Princeton Instruments .SPE files Message-ID: Hello, Are there any astropy users who also use equipment from Princeton Instruments? If so, is there interest in a module that reads in .SPE files into an astropy data structure (or into a pandas dataframe then into astropy)? (The problem is that exporting from .SPE to .FITS with the tools provided by Princeton Instruments and then loading into astropy often loses valuable metadata.) If anyone else would find this useful, please drop me a line. I'm interested in joining a collaboration. For the curious, .SPE file format specification: ftp://ftp.princetoninstruments.com/Public/Manuals/Princeton%20Instruments/SPE%203.0%20File%20Format%20Specification.pdf Thank you! Sam ********** Samuel Harrold PhD Student Astronomy Department University of Texas at Austin -------------- next part -------------- An HTML attachment was scrubbed... URL: From efy303 at gmail.com Mon May 12 23:19:20 2014 From: efy303 at gmail.com (Eliot Young) Date: Mon, 12 May 2014 21:19:20 -0600 Subject: [AstroPy] astropy with Princeton Instruments .SPE files In-Reply-To: References: Message-ID: Hello Sam, I'm attaching a routine I wrote a few years ago to read a sequence of images from an .spe file into a 3D numpy array - from when I was first learning python. I suspect you're far beyond this code, but maybe it's of some use. You can see that I wrote it before pyfits was subsumed into astropy.io.fits. Two routines... - load_spe(fname): parses one of our movie files into a 3D numpy array. Virtually no metadata is taken from the header, except for the pixel at a type, the x,y image dimensions and the number of frames. - spe2fits(): A wrapper for load_spe() to save a .spe file as a fits file. Regards, -Eliot ========================================== Eliot F. Young, Sc.D., Principal Scientist Southwest Research Institute 1050 Walnut St Boulder, CO 80302 720-432-2333 (cell and office) ========================================== On Thu, May 8, 2014 at 5:25 PM, Samuel Harrold wrote: > Hello, > > Are there any astropy users who also use equipment from Princeton > Instruments? If so, is there interest in a module that reads in .SPE files > into an astropy data structure (or into a pandas dataframe then into > astropy)? (The problem is that exporting from .SPE to .FITS with the tools > provided by Princeton Instruments and then loading into astropy often loses > valuable metadata.) > > If anyone else would find this useful, please drop me a line. I'm > interested in joining a collaboration. > > For the curious, .SPE file format specification: > > ftp://ftp.princetoninstruments.com/Public/Manuals/Princeton%20Instruments/SPE%203.0%20File%20Format%20Specification.pdf > > Thank you! > Sam > ********** > Samuel Harrold > PhD Student > Astronomy Department > University of Texas at Austin > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -- =================================== Eliot F. Young, Sc.D., Principal Scientist Southwest Research Institute 1050 Walnut St Boulder, CO 80302 720-432-2333 =================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: winview.py Type: text/x-python-script Size: 1563 bytes Desc: not available URL: From harrold at astro.as.utexas.edu Tue May 13 15:15:03 2014 From: harrold at astro.as.utexas.edu (Samuel Harrold) Date: Tue, 13 May 2014 14:15:03 -0500 Subject: [AstroPy] astropy with Princeton Instruments .SPE files In-Reply-To: References: Message-ID: Hi Eliot, Thanks so much for sharing! I also came across http://wiki.scipy.org/Cookbook/Reading_SPE_files With the scipy cookbook as a starting point, I hacked together a start to a package over the weekend (issues under parent repo "tsphot"): https://github.com/ccd-utexas/tsphot/tree/master/read_spe Thank you On Mon, May 12, 2014 at 10:19 PM, Eliot Young wrote: > Hello Sam, > > I'm attaching a routine I wrote a few years ago to read a sequence of > images from an .spe file into a 3D numpy array - from when I was first > learning python. I suspect you're far beyond this code, but maybe it's of > some use. You can see that I wrote it before pyfits was subsumed into > astropy.io.fits. > > Two routines... > - load_spe(fname): parses one of our movie files into a 3D numpy array. > Virtually no metadata is taken from the header, except for the pixel at a > type, the x,y image dimensions and the number of frames. > > - spe2fits(): > A wrapper for load_spe() to save a .spe file as a fits file. > > Regards, > -Eliot > > ========================================== > Eliot F. Young, Sc.D., Principal Scientist > Southwest Research Institute > 1050 Walnut St > Boulder, CO 80302 > 720-432-2333 (cell and office) > ========================================== > > > On Thu, May 8, 2014 at 5:25 PM, Samuel Harrold < > harrold at astro.as.utexas.edu> wrote: > >> Hello, >> >> Are there any astropy users who also use equipment from Princeton >> Instruments? If so, is there interest in a module that reads in .SPE files >> into an astropy data structure (or into a pandas dataframe then into >> astropy)? (The problem is that exporting from .SPE to .FITS with the tools >> provided by Princeton Instruments and then loading into astropy often loses >> valuable metadata.) >> >> If anyone else would find this useful, please drop me a line. I'm >> interested in joining a collaboration. >> >> For the curious, .SPE file format specification: >> >> ftp://ftp.princetoninstruments.com/Public/Manuals/Princeton%20Instruments/SPE%203.0%20File%20Format%20Specification.pdf >> >> Thank you! >> Sam >> ********** >> Samuel Harrold >> PhD Student >> Astronomy Department >> University of Texas at Austin >> >> >> _______________________________________________ >> AstroPy mailing list >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy >> >> > > > -- > =================================== > Eliot F. Young, Sc.D., > Principal Scientist > Southwest Research Institute > 1050 Walnut St > Boulder, CO 80302 > 720-432-2333 > =================================== > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martinberoiz at gmail.com Thu May 15 19:20:44 2014 From: martinberoiz at gmail.com (martin) Date: Thu, 15 May 2014 18:20:44 -0500 Subject: [AstroPy] astropy table to numpy array Message-ID: <0E5D67FC-02BE-4069-ACDE-8D3B8F984419@gmail.com> Hello, I?m trying to convert an astropy.table.table.Table object (named out) to a numpy array, but it will convert each row to a tuple. Also the type for the array is strange. I copy a snippet of what I?m trying to do below: np.array(out) Out[77]: array([(1, 9642.374, 41.886, 1.109, 2.45, 0.718), (2, 1430.236, 57.642, 1.277, 2.33, 0.51), (3, 638.677, 77.257, 1.254, 5.18, 0.784), ..., (6762, 1211.064, 937.82, 907.38, 1.81, 0.25), (6763, 1090.107, 911.179, 906.314, 2.68, 0.353), (6764, 2348.992, 333.94, 899.355, 3.67, 0.591)], dtype=[('NUMBER', ' References: <0E5D67FC-02BE-4069-ACDE-8D3B8F984419@gmail.com> Message-ID: On May 15, 2014, at 7:20 PM, martin wrote: > Hello, > I?m trying to convert an astropy.table.table.Table object (named out) to a numpy array, but it will convert each row to a tuple. > Also the type for the array is strange. I copy a snippet of what I?m trying to do below: > > np.array(out) > Out[77]: > array([(1, 9642.374, 41.886, 1.109, 2.45, 0.718), > (2, 1430.236, 57.642, 1.277, 2.33, 0.51), > (3, 638.677, 77.257, 1.254, 5.18, 0.784), ..., > (6762, 1211.064, 937.82, 907.38, 1.81, 0.25), > (6763, 1090.107, 911.179, 906.314, 2.68, 0.353), > (6764, 2348.992, 333.94, 899.355, 3.67, 0.591)], > dtype=[('NUMBER', ' > > Does anyone know how to get a 2D numpy array of all floats from an astropy table? Actually it is a numpy array, just not a simple one. It's a array of records or structs. You'll first have to realize that nothing can do that generally, particularly if some of the columns of the table aren't floats, and particularly if they aren't numbers at all. In this case they aren't all floats, but at least they are numbers. You could do it the safest way by inserting each column into the appropriately sized numpy array one column at a time in a loop (what I would recommend unless someone knows a better solution). One can essentially equivalence all but the first column to a 2d float array, but that is a bit tricky and unless you need the performance, I wouldn't recommend it. Something like (I haven't tested this!) out = np.zeros((len(input),ncolumns),dtype=np.float64) for n, (columnname, dummy) in enumerate(input.dtype): out[:,n] = input[columnname].astype(np.float64) From derek at astro.physik.uni-goettingen.de Thu May 15 20:01:14 2014 From: derek at astro.physik.uni-goettingen.de (Derek Homeier) Date: Fri, 16 May 2014 02:01:14 +0200 Subject: [AstroPy] astropy table to numpy array In-Reply-To: References: <0E5D67FC-02BE-4069-ACDE-8D3B8F984419@gmail.com> Message-ID: <2E60D9E2-66E5-4D91-B689-2D52E38B70A9@astro.physik.uni-goettingen.de> On 16.05.2014, at 1:43AM, Perry Greenfield wrote: >> I?m trying to convert an astropy.table.table.Table object (named out) to a numpy array, but it will convert each row to a tuple. >> Also the type for the array is strange. I copy a snippet of what I?m trying to do below: >> >> np.array(out) >> Out[77]: >> array([(1, 9642.374, 41.886, 1.109, 2.45, 0.718), >> (2, 1430.236, 57.642, 1.277, 2.33, 0.51), >> (3, 638.677, 77.257, 1.254, 5.18, 0.784), ..., >> (6762, 1211.064, 937.82, 907.38, 1.81, 0.25), >> (6763, 1090.107, 911.179, 906.314, 2.68, 0.353), >> (6764, 2348.992, 333.94, 899.355, 3.67, 0.591)], >> dtype=[('NUMBER', '> >> >> Does anyone know how to get a 2D numpy array of all floats from an astropy table? > > Actually it is a numpy array, just not a simple one. It's a array of records or structs. > > You'll first have to realize that nothing can do that generally, particularly if some of the columns of the table aren't floats, and particularly if they aren't numbers at all. In this case they aren't all floats, but at least they are numbers. > > You could do it the safest way by inserting each column into the appropriately sized numpy array one column at a time in a loop (what I would recommend unless someone knows a better solution). One can essentially equivalence all but the first column to a 2d float array, but that is a bit tricky and unless you need the performance, I wouldn't recommend it. This should do it in one go (no idea if it's memory-efficient though): out = np.array([input[c] for c in input.columns if input[c].dtype==np.dtype('>f8')]) (you can cut the ? if input[c].dtype part if you want to convert your integer columns to float). Does anyone know the difference between columns and colnames BTW? I would have expected input.columns to directly give me [input[c] for c in input.colnames] in the above example, but both seem to return just the names. Cheers, Derek From aldcroft at head.cfa.harvard.edu Thu May 15 21:28:42 2014 From: aldcroft at head.cfa.harvard.edu (Aldcroft, Thomas) Date: Thu, 15 May 2014 21:28:42 -0400 Subject: [AstroPy] astropy table to numpy array In-Reply-To: <2E60D9E2-66E5-4D91-B689-2D52E38B70A9@astro.physik.uni-goettingen.de> References: <0E5D67FC-02BE-4069-ACDE-8D3B8F984419@gmail.com> <2E60D9E2-66E5-4D91-B689-2D52E38B70A9@astro.physik.uni-goettingen.de> Message-ID: On Thu, May 15, 2014 at 8:01 PM, Derek Homeier < derek at astro.physik.uni-goettingen.de> wrote: > On 16.05.2014, at 1:43AM, Perry Greenfield wrote: > > >> I?m trying to convert an astropy.table.table.Table object (named out) > to a numpy array, but it will convert each row to a tuple. > >> Also the type for the array is strange. I copy a snippet of what I?m > trying to do below: > >> > >> np.array(out) > >> Out[77]: > >> array([(1, 9642.374, 41.886, 1.109, 2.45, 0.718), > >> (2, 1430.236, 57.642, 1.277, 2.33, 0.51), > >> (3, 638.677, 77.257, 1.254, 5.18, 0.784), ..., > >> (6762, 1211.064, 937.82, 907.38, 1.81, 0.25), > >> (6763, 1090.107, 911.179, 906.314, 2.68, 0.353), > >> (6764, 2348.992, 333.94, 899.355, 3.67, 0.591)], > >> dtype=[('NUMBER', ' ('Y_IMAGE', ' >> > >> > >> Does anyone know how to get a 2D numpy array of all floats from an > astropy table? > > > > Actually it is a numpy array, just not a simple one. It's a array of > records or structs. > > > > You'll first have to realize that nothing can do that generally, > particularly if some of the columns of the table aren't floats, and > particularly if they aren't numbers at all. In this case they aren't all > floats, but at least they are numbers. > > > > You could do it the safest way by inserting each column into the > appropriately sized numpy array one column at a time in a loop (what I > would recommend unless someone knows a better solution). One can > essentially equivalence all but the first column to a 2d float array, but > that is a bit tricky and unless you need the performance, I wouldn't > recommend it. > > This should do it in one go (no idea if it's memory-efficient though): > > out = np.array([input[c] for c in input.columns if > input[c].dtype==np.dtype('>f8')]) > > (you can cut the ? if input[c].dtype part if you want to convert your > integer columns to float). > > Does anyone know the difference between columns and colnames BTW? > I would have expected input.columns to directly give me > [input[c] for c in input.colnames] > in the above example, but both seem to return just the names. > input.columns is effectively an OrderedDict of the columns, with some added convenience like being able to select multiple columns by name, integer index, or with slices. input.colnames is just a shortcut for list(input.columns.keys()). - Tom > > Cheers, > Derek > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From embray at stsci.edu Fri May 16 11:01:01 2014 From: embray at stsci.edu (Erik Bray) Date: Fri, 16 May 2014 11:01:01 -0400 Subject: [AstroPy] astropy table to numpy array In-Reply-To: References: <0E5D67FC-02BE-4069-ACDE-8D3B8F984419@gmail.com> Message-ID: <5376282D.707@stsci.edu> On 05/15/2014 07:43 PM, Perry Greenfield wrote: > > On May 15, 2014, at 7:20 PM, martin wrote: > >> Hello, >> I?m trying to convert an astropy.table.table.Table object (named out) to a numpy array, but it will convert each row to a tuple. >> Also the type for the array is strange. I copy a snippet of what I?m trying to do below: >> >> np.array(out) >> Out[77]: >> array([(1, 9642.374, 41.886, 1.109, 2.45, 0.718), >> (2, 1430.236, 57.642, 1.277, 2.33, 0.51), >> (3, 638.677, 77.257, 1.254, 5.18, 0.784), ..., >> (6762, 1211.064, 937.82, 907.38, 1.81, 0.25), >> (6763, 1090.107, 911.179, 906.314, 2.68, 0.353), >> (6764, 2348.992, 333.94, 899.355, 3.67, 0.591)], >> dtype=[('NUMBER', '> >> >> Does anyone know how to get a 2D numpy array of all floats from an astropy table? > > Actually it is a numpy array, just not a simple one. It's a array of records or structs. > > You'll first have to realize that nothing can do that generally, particularly if some of the columns of the table aren't floats, and particularly if they aren't numbers at all. In this case they aren't all floats, but at least they are numbers. > > You could do it the safest way by inserting each column into the appropriately sized numpy array one column at a time in a loop (what I would recommend unless someone knows a better solution). One can essentially equivalence all but the first column to a 2d float array, but that is a bit tricky and unless you need the performance, I wouldn't recommend it. > > Something like (I haven't tested this!) > > out = np.zeros((len(input),ncolumns),dtype=np.float64) > for n, (columnname, dummy) in enumerate(input.dtype): > out[:,n] = input[columnname].astype(np.float64) In general one would have to do something like this. However if one can be *certain* that for a particular table all the columns are float64 (or otherwise the same type--this could be checked in advance) then it would still be possible to do something as simply as: data.view(np.float64).reshape(len(data), len(data.dtype)) where for a record array len(data) is the number of rows, and len(data.dtype) will give you the number of columns. Erik From jturner at gemini.edu Sat May 17 10:55:57 2014 From: jturner at gemini.edu (James Turner) Date: Sat, 17 May 2014 10:55:57 -0400 Subject: [AstroPy] Domain transfer Message-ID: <5377787D.3030205@gemini.edu> Hi everyone, Following AstroPy's fiscal sponsorship agreement, I'm in the process of transferring the astropy.org domain from my registrar to NumFOCUS, for safekeeping. This process reportedly takes ~5 days and can involve DNS down time when switching to the new registrar's name servers. We should be completely unaffected, as I temporarily switched our DNS to a third provider that I have an account with yesterday, but I expect there will be a bit more maintenance going on by NumFOCUS during the week, just in case. After the initial switch-over, I'm expecting Erik to be set up as admin and continue administering the subdomains as previously. Remember that you can also access the docs and github here (I'm not 100% sure whether the first one would still work) in the unlikely event of any problems: http://astropy.github.io http://astropy.readthedocs.org/en/stable/ https://github.com/astropy/astropy Thanks, James. From shailesh.ahuja03 at gmail.com Mon May 19 23:55:07 2014 From: shailesh.ahuja03 at gmail.com (Shailesh Ahuja) Date: Tue, 20 May 2014 11:55:07 +0800 Subject: [AstroPy] Request for Spectra files (in FITS format) Message-ID: Hi everyone, I am working on the Google summer of code project for reading/writing spectra. To successfully cover all use cases, I need your help to provide me Spectra files in FITS format. At this stage we are most interested files that contain 1-dimensional extracted spectra (either long slit, multi-object or echelle) from optical or infrared spectrographs. But feel free to send any spectra that you would like to able to read easily with Astropy. Your contribution is very important for this project, so if you do have any files, please send it to me by following the steps below: 1. Go to http://www.dropitto.me/shailesh1 2. Enter password 'spectra'. 3. Browse and upload the files I will try to make it work for as many spectra files as possible! Thank you so much for your contribution! Sincerely Shailesh Ahuja -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim.jenness at gmail.com Tue May 20 00:12:50 2014 From: tim.jenness at gmail.com (Tim Jenness) Date: Mon, 19 May 2014 21:12:50 -0700 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: References: Message-ID: Is this a FITS file containing a single spectrum? Or do you want files with multiple spectra? I mainly have the latter. -- Tim Jenness On Mon, May 19, 2014 at 8:55 PM, Shailesh Ahuja wrote: > Hi everyone, > > I am working on the Google summer of code project for reading/writing > spectra. To successfully cover all use cases, I need your help to provide > me Spectra files in FITS format. At this stage we are most interested files > that contain 1-dimensional extracted spectra (either long slit, > multi-object or echelle) from optical or infrared spectrographs. But feel > free to send any spectra that you would like to able to read easily with > Astropy. > > Your contribution is very important for this project, so if you do have > any files, please send it to me by following the steps below: > 1. Go to http://www.dropitto.me/shailesh1 > 2. Enter password 'spectra'. > 3. Browse and upload the files > > I will try to make it work for as many spectra files as possible! Thank > you so much for your contribution! > > Sincerely > Shailesh Ahuja > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eperez at iaa.es Tue May 20 00:20:14 2014 From: eperez at iaa.es (ES.Enrique Perez) Date: Mon, 19 May 2014 23:20:14 -0500 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: References: Message-ID: <39C43D2B-3D43-4CCA-A0FA-7488F668BEC3@iaa.es> Shailesh, You can download 100 spectral cubes from the CALIFA project in this page. I recommend using the V500 data: http://califa.caha.es/?q=content/califa-dr1 Direct FTP access to the V500 datacubes. Cheers, Enrique El 19/05/2014, a las 22:55, Shailesh Ahuja escribi?: > Hi everyone, > > I am working on the Google summer of code project for reading/writing spectra. To successfully cover all use cases, I need your help to provide me Spectra files in FITS format. At this stage we are most interested files that contain 1-dimensional extracted spectra (either long slit, multi-object or echelle) from optical or infrared spectrographs. But feel free to send any spectra that you would like to able to read easily with Astropy. > > Your contribution is very important for this project, so if you do have any files, please send it to me by following the steps below: > 1. Go to http://www.dropitto.me/shailesh1 > 2. Enter password 'spectra'. > 3. Browse and upload the files > > I will try to make it work for as many spectra files as possible! Thank you so much for your contribution! > > Sincerely > Shailesh Ahuja > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy -------------- next part -------------- An HTML attachment was scrubbed... URL: From shailesh.ahuja03 at gmail.com Tue May 20 00:41:12 2014 From: shailesh.ahuja03 at gmail.com (Shailesh Ahuja) Date: Tue, 20 May 2014 12:41:12 +0800 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: <39C43D2B-3D43-4CCA-A0FA-7488F668BEC3@iaa.es> References: <39C43D2B-3D43-4CCA-A0FA-7488F668BEC3@iaa.es> Message-ID: Tim, Both types are okay. You can send anything that you would like Astropy to be able to read. On Tue, May 20, 2014 at 12:20 PM, ES.Enrique Perez wrote: > Shailesh, > > You can download 100 spectral cubes from the CALIFA project in this page. > I recommend using the V500 data: > > http://califa.caha.es/?q=content/califa-dr1 > > Direct FTP access to the V500 datacubes. > > > Cheers, > Enrique > > > El 19/05/2014, a las 22:55, Shailesh Ahuja > escribi?: > > Hi everyone, > > I am working on the Google summer of code project for reading/writing > spectra. To successfully cover all use cases, I need your help to provide > me Spectra files in FITS format. At this stage we are most interested files > that contain 1-dimensional extracted spectra (either long slit, > multi-object or echelle) from optical or infrared spectrographs. But feel > free to send any spectra that you would like to able to read easily with > Astropy. > > Your contribution is very important for this project, so if you do have > any files, please send it to me by following the steps below: > 1. Go to http://www.dropitto.me/shailesh1 > 2. Enter password 'spectra'. > 3. Browse and upload the files > > I will try to make it work for as many spectra files as possible! Thank > you so much for your contribution! > > Sincerely > Shailesh Ahuja > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam.g.ginsburg at gmail.com Tue May 20 01:36:55 2014 From: adam.g.ginsburg at gmail.com (Adam Ginsburg) Date: Tue, 20 May 2014 07:36:55 +0200 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: References: <39C43D2B-3D43-4CCA-A0FA-7488F668BEC3@iaa.es> Message-ID: Hi Shailesh, There's a collection of data files from varied sources used for testing pyspeckit's readers hosted at https://github.com/pyspeckit/pyspeckit-tests. On Tue, May 20, 2014 at 6:41 AM, Shailesh Ahuja wrote: > Tim, > Both types are okay. You can send anything that you would like Astropy to be > able to read. > > > On Tue, May 20, 2014 at 12:20 PM, ES.Enrique Perez wrote: >> >> Shailesh, >> >> You can download 100 spectral cubes from the CALIFA project in this page. >> I recommend using the V500 data: >> >> http://califa.caha.es/?q=content/califa-dr1 >> >> Direct FTP access to the V500 datacubes. >> >> >> Cheers, >> Enrique >> >> >> El 19/05/2014, a las 22:55, Shailesh Ahuja >> escribi?: >> >> Hi everyone, >> >> I am working on the Google summer of code project for reading/writing >> spectra. To successfully cover all use cases, I need your help to provide me >> Spectra files in FITS format. At this stage we are most interested files >> that contain 1-dimensional extracted spectra (either long slit, multi-object >> or echelle) from optical or infrared spectrographs. But feel free to send >> any spectra that you would like to able to read easily with Astropy. >> >> Your contribution is very important for this project, so if you do have >> any files, please send it to me by following the steps below: >> 1. Go to http://www.dropitto.me/shailesh1 >> 2. Enter password 'spectra'. >> 3. Browse and upload the files >> >> I will try to make it work for as many spectra files as possible! Thank >> you so much for your contribution! >> >> Sincerely >> Shailesh Ahuja >> _______________________________________________ >> AstroPy mailing list >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy >> >> >> >> _______________________________________________ >> AstroPy mailing list >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy >> > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > -- Adam Ginsburg Fellow, European Southern Observatory http://www.adamgginsburg.com/ From lrodriguez at iafe.uba.ar Tue May 20 09:28:04 2014 From: lrodriguez at iafe.uba.ar (Leticia Rodriguez) Date: Tue, 20 May 2014 13:28:04 +0000 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: References: <39C43D2B-3D43-4CCA-A0FA-7488F668BEC3@iaa.es> Message-ID: We uploaded an example from Casleo Observatory, Argentina and it's hosted in NOVA (Argentina's VO) The filename: HR3090-u.ms.fits Regards. 2014-05-20 5:36 GMT+00:00 Adam Ginsburg : > Hi Shailesh, > There's a collection of data files from varied sources used for > testing pyspeckit's readers hosted at > https://github.com/pyspeckit/pyspeckit-tests. > > On Tue, May 20, 2014 at 6:41 AM, Shailesh Ahuja > wrote: > > Tim, > > Both types are okay. You can send anything that you would like Astropy > to be > > able to read. > > > > > > On Tue, May 20, 2014 at 12:20 PM, ES.Enrique Perez > wrote: > >> > >> Shailesh, > >> > >> You can download 100 spectral cubes from the CALIFA project in this > page. > >> I recommend using the V500 data: > >> > >> http://califa.caha.es/?q=content/califa-dr1 > >> > >> Direct FTP access to the V500 datacubes. > >> > >> > >> Cheers, > >> Enrique > >> > >> > >> El 19/05/2014, a las 22:55, Shailesh Ahuja > >> escribi?: > >> > >> Hi everyone, > >> > >> I am working on the Google summer of code project for reading/writing > >> spectra. To successfully cover all use cases, I need your help to > provide me > >> Spectra files in FITS format. At this stage we are most interested files > >> that contain 1-dimensional extracted spectra (either long slit, > multi-object > >> or echelle) from optical or infrared spectrographs. But feel free to > send > >> any spectra that you would like to able to read easily with Astropy. > >> > >> Your contribution is very important for this project, so if you do have > >> any files, please send it to me by following the steps below: > >> 1. Go to > >> 2. Enter password 'spectra'. > >> 3. Browse and upload the files > >> > >> I will try to make it work for as many spectra files as possible! Thank > >> you so much for your contribution! > >> > >> Sincerely > >> Shailesh Ahuja > >> _______________________________________________ > >> AstroPy mailing list > >> AstroPy at scipy.org > >> http://mail.scipy.org/mailman/listinfo/astropy > >> > >> > >> > >> _______________________________________________ > >> AstroPy mailing list > >> AstroPy at scipy.org > >> http://mail.scipy.org/mailman/listinfo/astropy > >> > > > > > > _______________________________________________ > > AstroPy mailing list > > AstroPy at scipy.org > > http://mail.scipy.org/mailman/listinfo/astropy > > > > > > -- > Adam Ginsburg > Fellow, European Southern Observatory > http://www.adamgginsburg.com/ > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > -- *Leticia Lorena Rodr?guez* Technical Contact NOVA - Virtual Observatory Argentina http://nova.conicet.gov.ar -------------- next part -------------- An HTML attachment was scrubbed... URL: From lrodriguez at iafe.uba.ar Tue May 20 10:05:31 2014 From: lrodriguez at iafe.uba.ar (Leticia Rodriguez) Date: Tue, 20 May 2014 14:05:31 +0000 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: References: <39C43D2B-3D43-4CCA-A0FA-7488F668BEC3@iaa.es> Message-ID: The HR3090-u.ms.fits don't have the wavelength calibration done. So, we also uploaded HD165052 spectra from the service: http://nova.iafe.uba.ar/fcaglp/q/web/form. 2014-05-20 13:28 GMT+00:00 Leticia Rodriguez : > We uploaded an example from Casleo Observatory, Argentina and it's hosted > in NOVA (Argentina's VO) > The filename: HR3090-u.ms.fits > > Regards. > > 2014-05-20 5:36 GMT+00:00 Adam Ginsburg : > >> Hi Shailesh, >> There's a collection of data files from varied sources used for >> testing pyspeckit's readers hosted at >> https://github.com/pyspeckit/pyspeckit-tests. >> >> On Tue, May 20, 2014 at 6:41 AM, Shailesh Ahuja >> wrote: >> > Tim, >> > Both types are okay. You can send anything that you would like Astropy >> to be >> > able to read. >> > >> > >> > On Tue, May 20, 2014 at 12:20 PM, ES.Enrique Perez >> wrote: >> >> >> >> Shailesh, >> >> >> >> You can download 100 spectral cubes from the CALIFA project in this >> page. >> >> I recommend using the V500 data: >> >> >> >> http://califa.caha.es/?q=content/califa-dr1 >> >> >> >> Direct FTP access to the V500 datacubes. >> >> >> >> >> >> Cheers, >> >> Enrique >> >> >> >> >> >> El 19/05/2014, a las 22:55, Shailesh Ahuja > > >> >> escribi?: >> >> >> >> Hi everyone, >> >> >> >> I am working on the Google summer of code project for reading/writing >> >> spectra. To successfully cover all use cases, I need your help to >> provide me >> >> Spectra files in FITS format. At this stage we are most interested >> files >> >> that contain 1-dimensional extracted spectra (either long slit, >> multi-object >> >> or echelle) from optical or infrared spectrographs. But feel free to >> send >> >> any spectra that you would like to able to read easily with Astropy. >> >> >> >> Your contribution is very important for this project, so if you do have >> >> any files, please send it to me by following the steps below: >> >> 1. Go to >> >> 2. Enter password 'spectra'. >> >> 3. Browse and upload the files >> >> >> >> I will try to make it work for as many spectra files as possible! Thank >> >> you so much for your contribution! >> >> >> >> Sincerely >> >> Shailesh Ahuja >> >> _______________________________________________ >> >> AstroPy mailing list >> >> AstroPy at scipy.org >> >> http://mail.scipy.org/mailman/listinfo/astropy >> >> >> >> >> >> >> >> _______________________________________________ >> >> AstroPy mailing list >> >> AstroPy at scipy.org >> >> http://mail.scipy.org/mailman/listinfo/astropy >> >> >> > >> > >> > _______________________________________________ >> > AstroPy mailing list >> > AstroPy at scipy.org >> > http://mail.scipy.org/mailman/listinfo/astropy >> > >> >> >> >> -- >> Adam Ginsburg >> Fellow, European Southern Observatory >> http://www.adamgginsburg.com/ >> _______________________________________________ >> AstroPy mailing list >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy >> > > > > -- > *Leticia Lorena Rodr?guez* > > Technical Contact > NOVA - Virtual Observatory Argentina > http://nova.conicet.gov.ar > > -- *Leticia Lorena Rodr?guez* Technical Contact NOVA - Virtual Observatory Argentina http://nova.conicet.gov.ar -------------- next part -------------- An HTML attachment was scrubbed... URL: From derek at astro.physik.uni-goettingen.de Tue May 20 10:38:49 2014 From: derek at astro.physik.uni-goettingen.de (Derek Homeier) Date: Tue, 20 May 2014 16:38:49 +0200 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: References: Message-ID: Hi Shailesh, > I am working on the Google summer of code project for reading/writing spectra. To successfully cover all use cases, I need your help to provide me Spectra files in FITS format. At this stage we are most interested files that contain 1-dimensional extracted spectra (either long slit, multi-object or echelle) from optical or infrared spectrographs. But feel free to send any spectra that you would like to able to read easily with Astropy. > thanks for your work on this! Is this intended to become part of the specutils package, or going directly into Astropy ?core?? I assume you?d be considering model spectra as well; I have one specific case however in the high-resolution spectra here http://phoenix.astro.physik.uni-goettingen.de/?page_id=10 which require the wavelengths to be read from a separate file (I suppose to deal with such a case would require a new keyword for the FITS reader). Cheers, Derek From teuben at astro.umd.edu Tue May 20 11:07:47 2014 From: teuben at astro.umd.edu (Peter Teuben) Date: Tue, 20 May 2014 11:07:47 -0400 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: References: Message-ID: <537B6FC3.9040606@astro.umd.edu> Shailesh are regular 3D cubes, such as the ones typically coming out of a radio interferometer (CARMA, ALMA) going to be acceptable as a use case? I guess you can see them as NX by NY "independant" spectra. I have plenty of those :-) peter On 05/19/2014 11:55 PM, Shailesh Ahuja wrote: > Hi everyone, > > I am working on the Google summer of code project for reading/writing > spectra. To successfully cover all use cases, I need your help to > provide me Spectra files in FITS format. At this stage we are most > interested files that contain 1-dimensional extracted spectra (either > long slit, multi-object or echelle) from optical or infrared > spectrographs. But feel free to send any spectra that you would like > to able to read easily with Astropy. > > Your contribution is very important for this project, so if you do > have any files, please send it to me by following the steps below: > 1. Go to http://www.dropitto.me/shailesh1 > 2. Enter password 'spectra'. > 3. Browse and upload the files > > I will try to make it work for as many spectra files as possible! > Thank you so much for your contribution! > > Sincerely > Shailesh Ahuja > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy -------------- next part -------------- An HTML attachment was scrubbed... URL: From bgarwood at nrao.edu Tue May 20 11:26:09 2014 From: bgarwood at nrao.edu (Bob Garwood) Date: Tue, 20 May 2014 11:26:09 -0400 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: <537B6FC3.9040606@astro.umd.edu> References: <537B6FC3.9040606@astro.umd.edu> Message-ID: <537B7411.3020107@nrao.edu> And what about SDFITS - FITS binary tables of single dish radio spectra? On 05/20/2014 11:07 AM, Peter Teuben wrote: > Shailesh > are regular 3D cubes, such as the ones typically coming out of a radio > interferometer (CARMA, ALMA) going to be acceptable as a use case? I > guess you can see them as NX by NY "independant" spectra. > > I have plenty of those :-) > > peter > > On 05/19/2014 11:55 PM, Shailesh Ahuja wrote: >> Hi everyone, >> >> I am working on the Google summer of code project for reading/writing >> spectra. To successfully cover all use cases, I need your help to >> provide me Spectra files in FITS format. At this stage we are most >> interested files that contain 1-dimensional extracted spectra (either >> long slit, multi-object or echelle) from optical or infrared >> spectrographs. But feel free to send any spectra that you would like >> to able to read easily with Astropy. >> >> Your contribution is very important for this project, so if you do >> have any files, please send it to me by following the steps below: >> 1. Go to http://www.dropitto.me/shailesh1 >> 2. Enter password 'spectra'. >> 3. Browse and upload the files >> >> I will try to make it work for as many spectra files as possible! >> Thank you so much for your contribution! >> >> Sincerely >> Shailesh Ahuja >> >> >> _______________________________________________ >> AstroPy mailing list >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy > > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkerzendorf at gmail.com Tue May 20 13:08:09 2014 From: wkerzendorf at gmail.com (Wolfgang Kerzendorf) Date: Tue, 20 May 2014 14:38:09 -0230 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: <537B7411.3020107@nrao.edu> References: <537B6FC3.9040606@astro.umd.edu> <537B7411.3020107@nrao.edu> Message-ID: Hey guys, Thanks for all the interest! For now we are only interested in 1D spectra (It is fine to have multiple of those in a fits file, e.g. multi spec) that have a world coordinate solution (in this case a wavelength calibration). Some spectra can already be read with the current version of specutils (see here http://specutils.readthedocs.org/en/latest/specutils/fits_wcs.html). Cheers, Wolfgang On Tue, May 20, 2014 at 12:56 PM, Bob Garwood wrote: > And what about SDFITS - FITS binary tables of single dish radio spectra? > > > On 05/20/2014 11:07 AM, Peter Teuben wrote: > > Shailesh > are regular 3D cubes, such as the ones typically coming out of a radio > interferometer (CARMA, ALMA) going to be acceptable as a use case? I > guess you can see them as NX by NY "independant" spectra. > > I have plenty of those :-) > > peter > > On 05/19/2014 11:55 PM, Shailesh Ahuja wrote: > > Hi everyone, > > I am working on the Google summer of code project for reading/writing > spectra. To successfully cover all use cases, I need your help to provide > me Spectra files in FITS format. At this stage we are most interested files > that contain 1-dimensional extracted spectra (either long slit, > multi-object or echelle) from optical or infrared spectrographs. But feel > free to send any spectra that you would like to able to read easily with > Astropy. > > Your contribution is very important for this project, so if you do have > any files, please send it to me by following the steps below: > 1. Go to http://www.dropitto.me/shailesh1 > 2. Enter password 'spectra'. > 3. Browse and upload the files > > I will try to make it work for as many spectra files as possible! Thank > you so much for your contribution! > > Sincerely > Shailesh Ahuja > > > _______________________________________________ > AstroPy mailing listAstroPy at scipy.orghttp://mail.scipy.org/mailman/listinfo/astropy > > > > > _______________________________________________ > AstroPy mailing listAstroPy at scipy.orghttp://mail.scipy.org/mailman/listinfo/astropy > > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkerzendorf at gmail.com Tue May 20 13:08:58 2014 From: wkerzendorf at gmail.com (Wolfgang Kerzendorf) Date: Tue, 20 May 2014 14:38:58 -0230 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: <537B7411.3020107@nrao.edu> References: <537B6FC3.9040606@astro.umd.edu> <537B7411.3020107@nrao.edu> Message-ID: Hi Bob, You can load binary tables already with astropy tables - specutils can then convert those to a spectrum object. Cheers, Wolfgang On Tue, May 20, 2014 at 12:56 PM, Bob Garwood wrote: > And what about SDFITS - FITS binary tables of single dish radio spectra? > > > On 05/20/2014 11:07 AM, Peter Teuben wrote: > > Shailesh > are regular 3D cubes, such as the ones typically coming out of a radio > interferometer (CARMA, ALMA) going to be acceptable as a use case? I > guess you can see them as NX by NY "independant" spectra. > > I have plenty of those :-) > > peter > > On 05/19/2014 11:55 PM, Shailesh Ahuja wrote: > > Hi everyone, > > I am working on the Google summer of code project for reading/writing > spectra. To successfully cover all use cases, I need your help to provide > me Spectra files in FITS format. At this stage we are most interested files > that contain 1-dimensional extracted spectra (either long slit, > multi-object or echelle) from optical or infrared spectrographs. But feel > free to send any spectra that you would like to able to read easily with > Astropy. > > Your contribution is very important for this project, so if you do have > any files, please send it to me by following the steps below: > 1. Go to http://www.dropitto.me/shailesh1 > 2. Enter password 'spectra'. > 3. Browse and upload the files > > I will try to make it work for as many spectra files as possible! Thank > you so much for your contribution! > > Sincerely > Shailesh Ahuja > > > _______________________________________________ > AstroPy mailing listAstroPy at scipy.orghttp://mail.scipy.org/mailman/listinfo/astropy > > > > > _______________________________________________ > AstroPy mailing listAstroPy at scipy.orghttp://mail.scipy.org/mailman/listinfo/astropy > > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnarayan at noao.edu Tue May 20 13:26:46 2014 From: gnarayan at noao.edu (Gautham Narayan) Date: Tue, 20 May 2014 10:26:46 -0700 Subject: [AstroPy] Request for Spectra files (in FITS format) In-Reply-To: References: <537B6FC3.9040606@astro.umd.edu> <537B7411.3020107@nrao.edu> Message-ID: <8DBFF8F1-3FAE-407E-B676-744EB3CA5B0A@noao.edu> Hi Shailesh and Wolfgang, You can get a lot of supernovae spectra directly from SUSPECT as a single tarball: http://www.nhn.ou.edu/~suspect/bulk.html These will be low-dispersion, longslit, optical spectra typically but there should be a good range of instruments represented. The TDC at Harvard should also have a large collection (not just SN) available as multispec FITS files: http://tdc-www.harvard.edu/archive/index.html Cheers, -Gautham On May 20, 2014, at 10:08 AM, Wolfgang Kerzendorf wrote: > Hey guys, > > Thanks for all the interest! For now we are only interested in 1D spectra (It is fine to have multiple of those in a fits file, e.g. multi spec) that have a world coordinate solution (in this case a wavelength calibration). Some spectra can already be read with the current version of specutils (see here http://specutils.readthedocs.org/en/latest/specutils/fits_wcs.html). > > Cheers, > Wolfgang > > > On Tue, May 20, 2014 at 12:56 PM, Bob Garwood wrote: > And what about SDFITS - FITS binary tables of single dish radio spectra? > > > On 05/20/2014 11:07 AM, Peter Teuben wrote: >> Shailesh >> are regular 3D cubes, such as the ones typically coming out of a radio >> interferometer (CARMA, ALMA) going to be acceptable as a use case? I >> guess you can see them as NX by NY "independant" spectra. >> >> I have plenty of those :-) >> >> peter >> >> On 05/19/2014 11:55 PM, Shailesh Ahuja wrote: >>> Hi everyone, >>> >>> I am working on the Google summer of code project for reading/writing spectra. To successfully cover all use cases, I need your help to provide me Spectra files in FITS format. At this stage we are most interested files that contain 1-dimensional extracted spectra (either long slit, multi-object or echelle) from optical or infrared spectrographs. But feel free to send any spectra that you would like to able to read easily with Astropy. >>> >>> Your contribution is very important for this project, so if you do have any files, please send it to me by following the steps below: >>> 1. Go to http://www.dropitto.me/shailesh1 >>> 2. Enter password 'spectra'. >>> 3. Browse and upload the files >>> >>> I will try to make it work for as many spectra files as possible! Thank you so much for your contribution! >>> >>> Sincerely >>> Shailesh Ahuja >>> >>> >>> _______________________________________________ >>> AstroPy mailing list >>> >>> AstroPy at scipy.org >>> http://mail.scipy.org/mailman/listinfo/astropy >> >> >> >> _______________________________________________ >> AstroPy mailing list >> >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy From beaumont at hawaii.edu Thu May 22 11:50:35 2014 From: beaumont at hawaii.edu (Chris Beaumont) Date: Thu, 22 May 2014 11:50:35 -0400 Subject: [AstroPy] New mailing list for Glue Message-ID: Hi Everyone, I just wanted to note that I've set up a new mailing list for Glue ( glueviz.org), at https://groups.google.com/forum/#!forum/glue-viz . If you aren't already familiar, Glue is a project to make it easier to create interactive, linked visualizations of related datasets. It's built on top of Qt, Matplotlib, and astropy, and is currently supported by the Space Telescope Science Institute. The goal for the mailing list is to establish a public forum for keeping up to date on the project, brainstorming about visualization and user interfaces in astronomy, etc. Cheers, Chris Beaumont -- ************************************* Chris Beaumont Senior Software Engineer Harvard Center for Astrophysics 60 Garden Street, MS 42 Cambridge, MA 02138 chrisbeaumont.org ************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From maik.riechert at arcor.de Sat May 24 12:04:14 2014 From: maik.riechert at arcor.de (Maik Riechert) Date: Sat, 24 May 2014 18:04:14 +0200 Subject: [AstroPy] Numerical issues with rotation_matrix Message-ID: <5380C2FE.5050708@arcor.de> Hi, I discovered today that astropy has a rotation_matrix function (in coordinates.angles) and wanted to use it instead of the one from Christoph Gohlke: http://www.lfd.uci.edu/~gohlke/code/transformations.py.html While doing some testing, I noticed that the values differ between rotation_matrix(angle, [1,0,0]) and rotation_matrix(angle, 'x') The latter version agrees with Gohlke's function. The difference between both versions in astropy is around the order of e-13 in my case, which leads to severe differences in further processing. Looking at the source code it seems as if the general array version uses sqrt and other things which may introduce numerical issues. I think a test case should be added which checks that 'x'/'y'/'z' produces the same values as [1,0,0] etc. My test case: >>> import numpy as np >>> from astropy.coordinates.angles import rotation_matrix as rot_astro >>> from gohlke.transformations import rotation_matrix as rot_gohlke >>> m1 = rot_astro(-0.07687069267192707, [1,0,0]) >>> m2 = rot_astro(-0.07687069267192707, 'x') >>> m2-m1 matrix([[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [ 0.00000000e+00, 2.22044605e-16, 1.30859299e-13], [ 0.00000000e+00, -1.30859299e-13, 2.22044605e-16]]) >>> m3 = rot_gohlke(np.deg2rad(-0.07687069267192707), [-1,0,0])[:3,:3] >>> m3-m2 matrix([[ 0., 0., 0.], [ 0., 0., 0.], [ 0., 0., 0.]]) I'm not completely sure which one is the more accurate one. This has to be validated. But if I should take a guess, it's m2/m3. Cheers Maik From gray at astro.columbia.edu Fri May 30 10:17:14 2014 From: gray at astro.columbia.edu (Graham Kanarek) Date: Fri, 30 May 2014 10:17:14 -0400 Subject: [AstroPy] Fitting model with arbitrary number of parameters Message-ID: <3FA73ED9-539C-4759-B46B-9F1FF94A909D@astro.columbia.edu> Hi all, I'm hoping I can find some help here. For my program, I need to fit a composite model made up of the sum of an arbitrary number of 1D Gaussians. Since fitting CompositeModels isn't yet implemented, I'd hoped to use a custom_model_1d as a workaround. However, I'm having a lot of trouble declaring the custom model with an arbitrary number of parameters; I tried using a list for each Gaussian1D parameter, but changing the length of the lists caused an error as well. So, I'm wondering if anyone has had success fitting a model with an arbitrary number of parameters... Thanks in advance! --Gray Kanarek From embray at stsci.edu Fri May 30 11:08:29 2014 From: embray at stsci.edu (Erik Bray) Date: Fri, 30 May 2014 11:08:29 -0400 Subject: [AstroPy] Fitting model with arbitrary number of parameters In-Reply-To: <3FA73ED9-539C-4759-B46B-9F1FF94A909D@astro.columbia.edu> References: <3FA73ED9-539C-4759-B46B-9F1FF94A909D@astro.columbia.edu> Message-ID: <53889EED.80106@stsci.edu> On 05/30/2014 10:17 AM, Graham Kanarek wrote: > Hi all, > > I'm hoping I can find some help here. For my program, I need to fit a composite model made up of the sum of an arbitrary number of 1D Gaussians. Since fitting CompositeModels isn't yet implemented, I'd hoped to use a custom_model_1d as a workaround. However, I'm having a lot of trouble declaring the custom model with an arbitrary number of parameters; I tried using a list for each Gaussian1D parameter, but changing the length of the lists caused an error as well. So, I'm wondering if anyone has had success fitting a model with an arbitrary number of parameters... > > Thanks in advance! > --Gray Kanarek Hi, There are some types of models (i.e. polynomial) that can take an "arbitrary" number of parameters, but that number is still fixed at the time the model is defined (in the case of polynomial models, for example, by fixing their degree). Currently, fitting a model that does not have a fixed-size parameter space (where the number of parameters is determined by the fit) is not directly supported by Astropy. One possible workaround is to just use a very large parameter space to begin with and fit to that, in which case the amplitudes of many of the Gaussians should go close to zero. I'd be happy to discuss this more offline if you'd like. Erik