yes ... sorry the x,y, and error lists should have commas between them ... I just copied and pasted them from a text file as an example.
What I mean by weighting the fit is that there is an error associated with
each x,y data point and when scipy does the fitting I would like it to take into
account that error so that points with huge errors don't have the same influence on the fit as a point with a very small error. ...
User Profile
Collapse
-
Scipy - How do you do a 'weighted' least squares fit to data?
Hi,
I have performed a fit to data using scipy's 'leastsq' function. However,
I wanted to be able to weight the fit by individual errors on the data points.
Here is an example of what I'm doing at the moment :
...Code:# fitting functions for the data fitfunc = lambda p,x: p[0] + p[1]*x errfunc = lambda p,x,y : y-fitfunc(p,x) x = [8365 7584 6956 6471 6149 6471 6956 7586]
-
-
Some help with strings
Hi,
I am just wondering if anyone can tell me how to do this :
Say I have a list like this :
listA = ['c','c','c','c' ,'c','c']
and I want to print out the contents but I don't want to square brackets .... for example if I do :
print listA
I get ----> ['c','c','c','c' ,'c','c']
But I just want this ------> 'c','c','c','c' ,'c','c'... -
Hi,
Try the command :
uname -a
This should give you all the info on your operating system.
uname command should be located in the /usr/bin directory in case your
PATH isn't correctly set ... then try :
/usr/bin/uname -a
Hope this helps...Leave a comment:
-
If you just want to do this while vi is open ...
You can just do this :
1. open file in vi
2. type this --> :%s/<Ctrl+V><Ctrl+M >// ----> then hit Enter
Where the <Ctrl+V> command is ... hold the Ctrl button and press the V key
and the same goes for the <Ctrl+M> command.
The <Ctrl+V> command will insert this character '^'
The <Ctrl+M>...Leave a comment:
-
Thanks Nepomuk ... I think this is the method I will try.
I will post back here when I have it done to let people know how it went.
Thanks again,...Leave a comment:
-
Hi,
No there is no floppy drive .... its mini-ITX system and I guess to even
make it smaller there is no place for an optical drive.
I guess the best thing is to this bootable USB drive option.
It does have a network card but I didn't think this could be used as an install
option if there was not some sort of OS already installed??
Cheers,Leave a comment:
-
Hi mac11,
Thanks for the reply ... I have an external usb cd/dvd drive but I did'nt think
that it would work without proper drivers etc.?? Can I just plug it in before booting
and there will be an option in the bios booting order? Sorry if that sounds like a
real stupid question but I have never installed an OS on a system without an
inbuilt optical drive!!
Thanks again,...Leave a comment:
-
installing linux without network/optical drives
hi,
Anyone have advice on installing a linux distro on a new computer with
no optical drive or network connection? I have heard you can put the live CDs
onto a USB key and boot from that ... is this easy? Is this the only way to do it?
Thanks -
Hi Nepomuk,
Thanks for the response ... I guess I was sorta vague ....
When I say small-ish I mean in terms of size .... hence I am looking
at the mini-ITX motherboards ... I think these are 17cm x 17cm.
I was looking at the following componets :
1. Nexus Psile Case & DVD writer
2. Jetway J9F2 Extreme HDMI Mini ITX Motherboard
3. T7200 2.0 GHz Inter Core 2 Duo...Leave a comment:
-
cheers ... didn't know where I should post a hardware question!!Leave a comment:
-
Building linux machine
Hi,
I want to build a small-ish computer from individual components ...
I have been taking parts from computers for years and upgrading
older computers with fans/PSUs/motherboards etc. but I have never
actually built a full system.
I want the machine to use a mini-ITX 2.0 motherboard and obviously
the same size case but I was wondering if anyone has any advice for
me on the best... -
Why use Twill if you are within python?? Why not use the mechanize/
ClientForm modules? ... From what I know Twill is just a wrapper around
these anyway. There are good usage examples on their website :
http://wwwsearch.sourc eforge.net/mechanize/Leave a comment:
-
hi,
I have used matplotlib a lot and I am interested in plotting a similar
type plot to your wind vector one. I was to show CCD chip pixel distortions
and I think this would be a nice way to show it.
Anyway, I do agree with Jim that the only way you will accomplish
what you want to do is to get matplotlib installed and do some of the
tutorials to help you get the feel for it. Once you...Leave a comment:
-
Hi,
Not really sure from you post what type of random number generator that you
need to use but just continuing on from what you were doing in your post with
'random.randran ge' ... I put together this bit of code. You must have the
extra python packages 'scipy' and 'Gnuplot.py' installed ... depending on your
system?? you should be able to install these easily. Otherwise I guess you
can calculate...Leave a comment:
-
yes .. speed of execution is the main thing that I'm interested to learn about.
I've use py2app to build macosx applications before but they were all written in
python using the pyobjc bridge.
I am just keen to know if there is a good site/book/tutorial to show me the steps involved in writing a new python module in C.
Thanks,Leave a comment:
-
How to write a new python module??
Hi,
I am not new to python and I use it all the time but I was wondering how to
create a brand spanking new module?? I know I could write it in python and
import it etc. but I was wondering how the professionals do it?? I mean
I assume they write the modules in C/C++ using their API's?? Could anyone maybe clear up the whole process for me?? Or point me to a good tutorial??
Thanks, -
python vcard parsing
Hi,
Just wondering if anyone can point me in the right direction ....
I want to write a program to parse the macosx addressbook vCards.
Is there modules out there that might come in handy for this??
Thanks, -
No activity results to display
Show More
Leave a comment: