Comments (3)
If any of the package was in python it would have been easier to have a norm=True
keyword argument for tran()
. Since it's all in C that would probably be tricky. It's a bit silly to add that to Atl
. It is a problem that the arrangement of the numpy arrays returned from tran()
are different to the numpy arrangement accepted by norm()
.
The reason tran()
doesn't do that by default is that AST doesn't want to waste time normalising the coordinates when those coordinates may well be transformed again anyhow.
from starlink-pyast.
It's fine that tran() doesn't default to that: no disagreement there. But it is very awkward to actually normalize the output of tran. Having some method that can be directly applied to the tran() output is the idea here.
from starlink-pyast.
I suppose we could provided an overloaded implementation of the norm method within pyast that check the type of its arguments to see if it is provided with a single array of floating point values, or an array of arrays and does the appropriate thing. But in addition you can also use the existing NormMap class to normalise the output from tran:
(a,b) = wcsinfo.tran( [[100.0,150.0],[200.0,250.0]] )
(c,d) = Ast.NormMap( wcsinfo ).tran( [a,b] )
The reason for not performing normalisation by default within tran is partly, as Tim says, to avoid unnecessary work. But it is also because there are some occasions when you do not want to perform the normalisation - e.g. when dealing with cylindrical projections such as CAR when you need to know if a transformed point has gone out of the domain of the projection.
from starlink-pyast.
Related Issues (10)
- tran() should support ND array input/output HOT 1
- Matplotlib dependency not listed in setup.py HOT 5
- Deprecation warnings with latest astropy version HOT 2
- compilation fails on Fedora 21 HOT 2
- Error pip installing 3.13.1 HOT 2
- Broken docs link. HOT 3
- `astTran` is documented to use `forward` as a keyword argument, but it does not
- Error when using astropy in lieu of pyfits HOT 4
- WCS information for SIP files doesn't survive write/read round trip to FITS file. HOT 31
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starlink-pyast.