From realtimcornwell at gmail.com Sun Feb 11 12:47:39 2018 From: realtimcornwell at gmail.com (Tim Cornwell) Date: Sun, 11 Feb 2018 17:47:39 +0000 Subject: [AstroPy] Conversion from a Cartesian representation to SkyCoord Message-ID: <01F857A7-CC92-4253-A1D8-F82AF7D0D627@gmail.com> I'm working with some radio data in astropy. I need to convert to and from the l, m, n. Given a position on the sky, pos, I can calculate l, m, n as follows: todc = pos.transform_to(phasecentre.skyoffset_frame()) dc = todc.represent_as(CartesianRepresentation) l, m, n = dc.y.value, dc.z.value, dc.x.value - 1 How do I do the reverse operation? i.e. given a set of l, m, n defined with respect to phase centre how to get the SkyCoord? The easy part is the conversion between direction cosines and l, m, n: dc = lm[2] + 1, lmn[0], lmn[1] Thanks, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From realtimcornwell at gmail.com Sun Feb 11 15:25:54 2018 From: realtimcornwell at gmail.com (Tim Cornwell) Date: Sun, 11 Feb 2018 20:25:54 +0000 Subject: [AstroPy] Conversion from a Cartesian representation to SkyCoord In-Reply-To: <01F857A7-CC92-4253-A1D8-F82AF7D0D627@gmail.com> References: <01F857A7-CC92-4253-A1D8-F82AF7D0D627@gmail.com> Message-ID: <94B33EDF-AA6E-4631-A80F-24BBB975CD0F@gmail.com> Solved this myself: n = numpy.sqrt(1-l**2-m**2)-1.0 dc = n + 1, l, m target = SkyCoord(x=dc[0], y=dc[1], z=dc[2], representation='cartesian', frame=phasecentre.skyoffset_frame()) return target.transform_to(phasecentre.frame) > On 11 Feb 2018, at 5:47 pm, Tim Cornwell wrote: > > I'm working with some radio data in astropy. I need to convert to and from the l, m, n. Given a position on the sky, pos, I can calculate l, m, n as follows: > > todc = pos.transform_to(phasecentre.skyoffset_frame()) > dc = todc.represent_as(CartesianRepresentation) > l, m, n = dc.y.value, dc.z.value, dc.x.value - 1 > How do I do the reverse operation? i.e. given a set of l, m, n defined with respect to phase centre how to get the SkyCoord? The easy part is the conversion between direction cosines and l, m, n: > > dc = lm[2] + 1, lmn[0], lmn[1] > Thanks, Tim > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From b_eebs at hotmail.com Sun Feb 11 18:39:15 2018 From: b_eebs at hotmail.com (Dean Sayre) Date: Sun, 11 Feb 2018 23:39:15 +0000 Subject: [AstroPy] Obser_time Message-ID: Hello, I was wondering if it's possible to print only the time, excluding the date, using observe_time. My set up looks something like this: I'm beginning my observation at say, observe_time = Time('2018-02-01 12:00:00') and would like to make an observation approximately every minute per hour, for a whole day, i.e. observe_time = observe_time + np.linspace(0, 24, 1400)*u.hour. >From this, my current list shows 1400 pairs of times and dates, and I'd simply like just the times. My underlying goal is to find a few mean anomalies of interest, so if instead there is a shortcut to that calculation, that would be preferred. Thanks in advance, -------------- next part -------------- An HTML attachment was scrubbed... URL: From matteo at matteobachetti.it Fri Feb 16 05:58:24 2018 From: matteo at matteobachetti.it (Matteo) Date: Fri, 16 Feb 2018 10:58:24 +0000 Subject: [AstroPy] Stingray 0.1rc1, and HENDRICS 4.0rc1, available! Message-ID: Dear all, We are happy to announce the first release candidate of Stingray ( stingray.readthedocs.io), an X-ray spectral-timing library in Python, and the contextual update to the HENDRICS (hendrics.readthedocs.io) command-line interface. Currently implemented functionality in Stingray comprises: - loading event lists from fits files of a few missions (RXTE/PCA, NuSTAR/FPM, XMM-Newton/EPIC) - constructing light curves from event data, various operations on light curves (e.g. add, subtract, join, truncate) - Good Time Interval operations - power spectra in Leahy, rms normalization, absolute rms and no normalization - averaged power spectra - dynamical power spectra - maximum likelihood fitting of periodograms/parametric models - (averaged) cross spectra - coherence, time lags - cross correlation functions - r.m.s. spectra and lags (time vs energy, time vs frequency); WORKING BUT UNDER DEVELOPMENT - covariance spectra; WORKING BUT UNDER DEVELOPMENT - bispectra; WORKING BUT UNDER DEVELOPMENT - (Bayesian) quasi-periodic oscillation searches - simulating a light curve with a given power spectrum - simulating a light curve from another light curve and a 1-d (time) or 2-d (time-energy) impulse response - simulating an event list from a given light curve _and_ with a given energy spectrum - pulsar searches with Epoch Folding, Z^2_n test2 - Pulsar Time-Of-Arrival calculation New additions to HENDRICS in this release include: - Power spectral fitting with maximum-likelihood methods - Lots of new functionality for X-ray pulsars, including an interactive phaseogram to estimate frequency derivatives and orbital parameters, and calculate pulsar Times-Of-Arrivals. - Lots of bug fixes Installation of the software We recommend installing these release candidates through the conda-forge channel: conda install -c conda-forge stingray conda install -c conda-forge hendrics [numba netcdf4 statsmodels] Alternatively, you can use pip pip install [--upgrade] stingray pip install [--upgrade] hendrics [numba netcdf4 statsmodels] Please let us know how it goes! Feel free to open an Issue in our github repositories https://github.com/stingraysoftware/stingray https://github.com/stingraysoftware/hendrics *Acknowledgements* We thank all the contributors to the code, and notably the GSoC students Himanshu Mishra, Usman Khan, Haroon Rashid, Omar Gamal, Danish Sodhi. The Stingray developers: Daniela Huppenkothen Matteo Bachetti Abigail Stevens Evandro Martin Ribeiro Paul Balm Simone Migliari -------------- next part -------------- An HTML attachment was scrubbed... URL: From skoulatos at gmail.com Sun Feb 18 13:03:00 2018 From: skoulatos at gmail.com (Markos Skoulatos) Date: Sun, 18 Feb 2018 19:03:00 +0100 Subject: [AstroPy] negative years in astropy Message-ID: Hello everyone, I need to read in data of eclipses which date from -2000 to 3000 (5 millennia). My problem is how to read in negative dates in astropy. For positive dates, it works like this for example: t = Time('2020-01-05T03:39:36') print t.plot_date print t.iso I would need to input dates with yyyy mm dd time, such as for example: -0197 Aug 07 06:20:16 Any ideas how to do this? I am using python 2.0 cheers, Markos -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik.tollerud at gmail.com Mon Feb 19 13:50:40 2018 From: erik.tollerud at gmail.com (Erik Tollerud) Date: Mon, 19 Feb 2018 13:50:40 -0500 Subject: [AstroPy] ANN: Astropy v3.0 released Message-ID: Dear colleagues, We are very happy to announce the v3.0 release of the Astropy package, a core Python package for Astronomy: http://www.astropy.org Astropy is a community-driven Python package intended to contain much of the core functionality and common tools needed for astronomy and astrophysics. It is part of the Astropy Project, which aims to foster an ecosystem of interoperable astronomy packages for Python. New and improved major functionality in this release includes: * Full support for velocities in the coordinates subpackage, including SkyCoord objects and proper motion corrections. * Very large ASCII files can now be read in as chunks, allowing larger tables to be efficiently read in, along with other performance improvements reading tables. * Time objects can now be read from or written to FITS files following the official FITS time standard. * Table mixin columns (e.g., quantities) can now be losslessly saved to HDF5 or FITS tables. * Constants can now be versioned using context managers. * Support for quantities in scipy special functions * A new command line script, "showtable", is available to display tables from any format Astropy can read. * The pytest plugins for testing Astropy have been moved to external packages, enabling their use in a wider range of Python packages. * False alarm probabilities are now available for the Lomb-Scargle periodogram implementation. In addition, hundreds of smaller improvements and fixes have been made. An overview of the changes is provided at: http://docs.astropy.org/en/stable/whatsnew/3.0.html Note that the Astropy 3.x series is the first to only support Python 3. Python 2 users can continue to use the 2.x series, which will receive bug fixes and support until the Python developers permanently sunset Python 2.7 (scheduled for 2019). Instructions for installing Astropy are provided on our website, and extensive documentation can be found at: http://docs.astropy.org If you make use of the Anaconda Python Distribution, you can update to Astropy v3.0 with: conda update astropy Whereas if you usually use pip, you can do: pip install astropy --upgrade Please report any issues, or request new features via our GitHub repository: https://github.com/astropy/astropy/issues Over 253 developers have contributed code to Astropy so far, and you can find out more about the team behind Astropy here: http://www.astropy.org/team.html As a reminder, Astropy v2.0 (our long term support release) will continue to be supported with bug fixes until the end 2019, so if you need to use Astropy in a very stable environment, you may want to consider staying on the v2.0.x set of releases (for which we have recently released v2.0.4). If you use Astropy directly for your work, or as a dependency to another package, please remember to include the following acknowledgment at the end of papers: "This research made use of Astropy, a community-developed core Python package for Astronomy (Astropy Collaboration, 2018)." where (Astropy Collaboration, 2018) is a citation to the Astropy Paper II: https://arxiv.org/abs/1801.02634 This paper is still under review, however, and an earlier paper is available describing the status of the package at the time of v0.2. If your work has used Astropy since then, you are encouraged to acknowledge both papers: This research made use of Astropy, a community-developed core Python package for Astronomy (Astropy Collaboration, 2013, 2018). where (Astropy Collaboration, 2013) is a citation to the first Astropy Paper: http://dx.doi.org/10.1051/0004-6361/201322068 Please feel free to forward this announcement to anyone you think might be interested in this release! The announcement can also be found online at http://www.astropy.org/announcements/release-3.0.html. Special thanks to the coordinator for this release: Brigitta Sipocz. Erik Tollerud, Tom Robitaille, Kelle Cruz, and Tom Aldcroft on behalf of The Astropy Collaboration From stuart at cadair.com Sun Feb 25 15:27:57 2018 From: stuart at cadair.com (Stuart Mumford) Date: Sun, 25 Feb 2018 20:27:57 +0000 Subject: [AstroPy] Release of ndcube 1.0 Message-ID: The SunPy project is very happy to announce the release of a new package "ndcube". ndcube is a package built for handling, inspecting and visualizing a wide variety of data, of any number of dimensions, along with coordinate information described by FITS-WCS. The NDCube object is based on the astropy NDData class, and adds functionality for slicing both the data and the WCS simultaneously, plotting with matplotlib and support for extra coordinate information along any of the axes not described by WCS. In addition to this the ndcube package provides the NDCubeSequence class for representing sequences of NDCube objects where the coordinate information may or may not align, and accessing these sequences in a way consistent with a singular cube. The ndcube development has been lead by Daniel Ryan with contributions from the following people: * Daniel Ryan * Ankit Baruah * Stuart Mumford * Mateo Inchaurrandieta * Nabil Freij * Drew Leonard * Shelbe Timothy A lot of the design and development of ndcube was done as part of Ankit's Google Summer of Code project in the summer of 2017. For more information about ndcube see the documentation . ndcube can be installed from pip or conda using the following commands: ? $ conda install -c conda-forge ndcube ? $ pip install ndcube Happy Pythoning, Stuart Mumford -------------- next part -------------- An HTML attachment was scrubbed... URL: