[Tutor] Matching 3 tables with almost identical columns

2012-08-13 Thread Elaina Ann Hyde
Greetings, I have a rather monolithic database I am re-building at the moment, and I want to join 3 tables with semi-matching content, I have several sets of these but they all come in groups of three. Here is the situation: --note all tables are in ascii format, space deliminated, with readab

Re: [Tutor] Looping over histogram plots

2012-06-26 Thread Elaina Ann Hyde
Yay Python: The solution was a syntax one, if anyone else ever feels like massively multi-plotting histograms, here is the working code: #-- fig, axes = plt.subplots(nrows=5, ncols=6, figsize=(12,6)) index=0 for b in axes: for ax in b: inde

Re: [Tutor] Looping over histogram plots

2012-06-26 Thread Elaina Ann Hyde
, 2012 at 9:19 PM, Don Jennings wrote: > > Message: 1 > > Date: Tue, 26 Jun 2012 18:40:50 +1000 > > From: Elaina Ann Hyde > > To: tutor@python.org > > Subject: [Tutor] Looping over histogram plots > > > > >set=(dat['a'+str(index)] == 1

[Tutor] Looping over histogram plots

2012-06-26 Thread Elaina Ann Hyde
Hello all, I have been making some big multiplots lately and found a nice little way of writing out 30 plots as follows, this part works great and leads up to my question, here I have 30 sets defined by the set=(), in this case I get a nice arrangement of 30 plots for V(GSR) and Log(g) (2 variab

Re: [Tutor] plotting several datasets and calling data from afar

2012-03-26 Thread Elaina Ann Hyde
On Mon, Mar 26, 2012 at 11:14 PM, Evert Rol wrote: > Hi Elaina, > > > > Hi everyone, > >I am trying to set up a code to do some plotting and before I get too > far I wanted to ask some structure questions. Basically I want to tell > python to read 2 datasets, plot them on the same scale on

[Tutor] plotting several datasets and calling data from afar

2012-03-26 Thread Elaina Ann Hyde
Hi everyone, I am trying to set up a code to do some plotting and before I get too far I wanted to ask some structure questions. Basically I want to tell python to read 2 datasets, plot them on the same scale on the same x-y axis , read a third dataset and match the name from the first dataset,

Re: [Tutor] Reading/dealing/matching with truly huge (ascii) files

2012-02-23 Thread Elaina Ann Hyde
On Thu, Feb 23, 2012 at 9:07 PM, Alan Gauld wrote: > On 23/02/12 01:55, Elaina Ann Hyde wrote: > ns/7.2/lib/python2.7/site-**packages/asciitable-0.8.0-py2.**7.egg/asciitable/core.py", > > >> line 158, in get_lines >> lines = table.splitlines() >> MemoryEr

Re: [Tutor] Reading/dealing/matching with truly huge (ascii) files

2012-02-22 Thread Elaina Ann Hyde
On Wed, Feb 22, 2012 at 8:50 PM, Peter Otten <__pete...@web.de> wrote: > Elaina Ann Hyde wrote: > > > So, Python question of the day: I have 2 files that I could normally > just > > read in with asciitable, The first file is a 12 column 8000 row table > that > &g

[Tutor] Reading/dealing/matching with truly huge (ascii) files

2012-02-21 Thread Elaina Ann Hyde
So, Python question of the day: I have 2 files that I could normally just read in with asciitable, The first file is a 12 column 8000 row table that I have read in via asciitable and manipulated. The second file is enormous, has over 50,000 rows and about 20 columns. What I want to do is find th

Re: [Tutor] finding a maximum between the absolute difference of several columns

2012-02-16 Thread Elaina Ann Hyde
On Fri, Feb 17, 2012 at 2:27 PM, Mark Lawrence wrote: > On 17/02/2012 02:53, Elaina Ann Hyde wrote: > >> On Fri, Feb 17, 2012 at 1:41 PM, Rohan Sachdeva wrote: >> >> The way I would do this is to put all of the differences in a list then >>> take the ma

Re: [Tutor] finding a maximum between the absolute difference of several columns

2012-02-16 Thread Elaina Ann Hyde
[a,b,c]) > > That should work. a,b,c are pretty bad variable names... > > Rohan > > On Thu, Feb 16, 2012 at 5:04 PM, Elaina Ann Hyde wrote: > >> Hello all, >>I am still scripting away and have reached my next quandry, this one >> is much simpler th

[Tutor] finding a maximum between the absolute difference of several columns

2012-02-16 Thread Elaina Ann Hyde
Hello all, I am still scripting away and have reached my next quandry, this one is much simpler than the last, basically I read in a file with several columns. Vmatch3_1=dat[col1] Vmatch3_2=dat[col2] Vmatch3_3=dat[col3] Vdav=5.0 Vhel_fdiff3=max(abs(Vmatch3_1 - Vmatch3_2),abs(Vmatch3_1 - Vmatch3_

Re: [Tutor] Request for advice on Python code

2012-02-13 Thread Elaina Ann Hyde
On Tue, Feb 14, 2012 at 1:38 PM, Andre' Walker-Loud wrote: > Hi Elaina, > > just reading your question (and responses). There is an issue with what > you wrote in the email, which may help. > > > for row in dat: > > > > gcoords=ICRSCoordinates(dat['ra-drad'],dat['dec-drad'],radians=True).conver

Re: [Tutor] Request for advice on Python code

2012-02-13 Thread Elaina Ann Hyde
On Tue, Feb 14, 2012 at 11:52 AM, Alan Gauld wrote: > On 13/02/12 23:50, Elaina Ann Hyde wrote: > >> Hi, I'm working on a routine for reading in the Schlegel dustmaps. I >> have an ascii table with values, Ra-Dec and I'm trying to convert 2 >> columns to l,b an