The suggestion to download sage-virtualbox-4.2.1.p1 worked...I think(I also downloaded a newer version of VirtualBox (3,1,2 -- they really update fast). Thanks!
TP On Fri, Dec 18, 2009 at 9:10 AM, <sage-support@googlegroups.com> wrote: > Today's Topic Summary > > Group: http://groups.google.com/group/sage-support/topics > > - Using the simple server API <#125a2c4c4a494fb4_group_thread_0> [1 > Update] > - How to create local copy of an FFT > object?<#125a2c4c4a494fb4_group_thread_1>[1 Update] > - ploting x^(1/3) <#125a2c4c4a494fb4_group_thread_2> [1 Update] > - latex binary and dvips binary <#125a2c4c4a494fb4_group_thread_3> [4 > Updates] > - Sage 4.2.1 under Windows 7 not functioning with VirtualBox > either?<#125a2c4c4a494fb4_group_thread_4>[1 Update] > - sage bug report <#125a2c4c4a494fb4_group_thread_5> [6 Updates] > - divide polynomials <#125a2c4c4a494fb4_group_thread_6> [3 Updates] > - Was: Graph plotting and labels <#125a2c4c4a494fb4_group_thread_7> [3 > Updates] > - Graph plotting and labels <#125a2c4c4a494fb4_group_thread_8> [1 > Update] > - Save to .sage file <#125a2c4c4a494fb4_group_thread_9> [1 Update] > > Topic: Using the simple server > API<http://groups.google.com/group/sage-support/t/994cac4a533a0f77> > > Stefan <stefan.louis.no...@gmail.com> Dec 18 08:53AM -0800 > > Hi all, > > I surfed through the discussion board and through the documentation on > trying to figure out how to get the simple server API up and running. > I made sure to run 'import sage.server.simple.twist' in my sage > prompt. Is there a way to easily test Sage to see if the API is > functioning such as entering the address into the address bar: > > > http://localhost:8000/simple/login?username=myusername&password=mypassword > > I get the dreaded "Internal Server Error" message. > > Thanks! > > > > Topic: How to create local copy of an FFT > object?<http://groups.google.com/group/sage-support/t/613d44cd40d827ec> > > Maxim <maxim.courno...@gmail.com> Dec 18 08:45AM -0800 > > Hello! > > I am working with the builtin FFT Fast Fourier Transform of Sagemath, > and have coded (based on the work of P. Lutus here : > http://vps.arachnoid.com/sage/fourier.html) a function that takes an > fftobject to plot the spectrum of a function. > > My problem is that when I pass the fftobject, I don't know how to make > a local copy of this object inside the scope of my function. The > result if that after my first call of this function, the fftobject > gets modified (globally) when I run fftobject.fordward_transform() on > it. This is not what I want, because I want to reuse this same object > unchanged further in my code. > > I'm new at Python, so I do not know a lot about this. I have first > tried to to something as : > fftobject_copy = fftobject > But it would just create a pointer to fftobject, and still allow the > function to modify its content. I tried to use the list copy : > fft_object_copy = fftobject[:] > But it would loose it's FFT specific functions, such as in > "fftobject.forward_transform()". > > So, how can I make a local copy of an FFT object? An example of my > code is following. > Many thanks! > > > ## My functions declaration. Notice the fft_unilateral(fftobj) > function, where I'm trying to make a local copy of > ## fftobj. > # magnitude of 2-component cartesian vector > def mag(x): > return sqrt(x[0]^2+x[1]^2) > > def nextpow2(i): > n = 2 > while n < i: n = n * 2 > return n > > def fft_unilateral(fftobj): > # fftobj_copy = fftobj[:] <== Trying to create a local copy of > fftobj here! > fftobj_copy = fftobj # <== fftobj_copy is not a copy but a > pointer to fftobj! > fftobj_copy.forward_transform() > lfft = len(fftobj_copy) > dt = 1.0/lfft > list = map(lambda x:(2*mag(x))*dt,fftobj_copy[:lfft/2]) > list[0]=list[0]/2 > return list > > # frequency unilateral domain plot > def fft_plot(fftobj,line_color='blue',labels= > ('Frequence','Amplitude')): > list = fft_unilateral(fftobj) > return list_plot > (list,rgbcolor=line_color,plotjoined=True,axes_labels=labels) > > # Power Spectrum Density plot > def psd_plot(fftobj,line_color='blue',labels= > ('Frequence','Amplitude')): > list = fft_unilateral(fftobj) > for i in range(len(list)): > list[i]=list[i]^2 > return list_plot > (list,rgbcolor=line_color,plotjoined=True,axes_labels=labels) > > ## Begin main program > # Define time domain function (AM without overmodulation here) > m(t)= cos(2*pi*100*t) > p(t)= cos(2*pi*1000*t) > AM1(t)=(1 + 0.5*m(t))*p(t) > > # Create > samples=4000 > lfft=nextpow2(samples) > # samples = sampling frequency > # Create fft object > fft_a=FFT(lfft) > # Fill fftobject with time domain data > for t in range(lfft): > fft_a[t] = AM1(t/lfft) > > ## Finally, ready to fire it up. > # If you have succeded to create a local copy in the fft_unilateral > function, then the two following PSDs are > # identical. If not, then they differ. > fft_plot(fft_a,line_color='blue',labels=('$f$ (Hz)','$|\Phi(f)|$')) > > # Copy to new cell > fft_plot(fft_a,line_color='blue',labels=('$f$ (Hz)','$|\Phi(f)|$')) > > > > Topic: ploting > x^(1/3)<http://groups.google.com/group/sage-support/t/6d4b8e056a42fb24> > > Hobus <josel...@gmail.com> Dec 18 06:55AM -0800 > > Why when I want to graph f=x^(1/3) I get the following error? > In this case, what should I do to get the complete graph? > > > > sage: plot(x^(1/3),x,-1,1) > > verbose 0 (2999: plot.py, generate_plot_points) WARNING: When > plotting, > failed to evaluate function at 100 points. > verbose 0 (2999: plot.py, generate_plot_points) Last error message: > 'negative number to a fractional power not real' > > > And the graph goes wrong > > Greetings > > > > Topic: latex binary and dvips > binary<http://groups.google.com/group/sage-support/t/29c2efa1edeca431> > > Mikie <thephantom6...@hotmail.com> Dec 17 10:38AM -0800 > > Robert, great stuff. I am installing now. How long does it take? > > > > > > Mikie <thephantom6...@hotmail.com> Dec 17 01:09PM -0800 > > It took about hour and a half. The fonts are a little fuzzy. Is > there anyway to fix this? > > > > > > Dima Pasechnik <dimp...@gmail.com> Dec 18 04:42PM +0800 > > Are you talking about the postscript files produced by dvips? > You probably only installed a small subset of fonts, and scaling them > produces substandard results. It can also be that dvips is set up to > create 300 DPI (dots per inch) docs - this is easy to fix then (but > depends upon a particular setup). > You can try using -D option of dvips (with value 600, say) > HTH, > Dmitrii > > > -- > Dmitrii Pasechnik > ----- > DISCLAIMER: Any text following this sentence does not constitute a > part of this message, and was added automatically during transmission. > > > > > "ma...@mendelu.cz" <ma...@mendelu.cz> Dec 18 01:22AM -0800 > > I think that better is to use scalable fonts. this should be default > in modern distribution. What exactly you have installed? texlive? from > where, from texlive homepage or from centos repository? > > Try to compile you ps into PDF (using ps2pdf), open PDF document, go > to the document - properties and you should see the fonts used in the > PDf file. Check that there are only scalable fonts. There shoud be no > Type3 font! > > Or put the ps or pdf file somewhere and post link. > > Robert > > > > > Topic: Sage 4.2.1 under Windows 7 not functioning with VirtualBox > either? <http://groups.google.com/group/sage-support/t/9957ce18f5344af5> > > "Charles J. Daniels" <chaja...@gmail.com> Dec 17 07:39PM -0800 > > > The VirtuaBox incarnation doesn't seem to be able to get to a Sage > notebook. > > It will bring you to the Sage web sit--but nothing more. So--can't > even > > say whether it works well or not--it just doesn't seem to work. > > If you are running VirtualBox version 3.1.0, which appliance are you > importing? A newer one was exported fairly recently to correct a > problem that occurred during importing. The MD5 checksum of the zip > you downloaded should be b13de836ea5541ba34bca03310a5d265. The name of > the new zip file I downloaded was sage-virtualbox-4.2.1.p1.zip, and > the older one that didn't work for me lacked the p1 towards the end. > To determine the checksum of my downloaded zip I had to download a > freeware app. I winded up with the one at > http://www.irnis.net/soft/xcsc/, > if that helps. > > --charlie > > > > Topic: sage bug > report<http://groups.google.com/group/sage-support/t/ac9b0370b7d36128> > > Christian Szegedy <christian.szeg...@gmail.com> Dec 17 11:39AM -0800 > > You evaluate it over ZZ[x1,...,xn] rather than GF(2)[x1,...,x4]. > > Anyways, it simply can't be *that* slow in any case: even: the > (theoretically ) maximum number of monoms that can be in any > expansion is less than a few thousands, so the upper limit > for a naively implemented Gaussian elimination is in the > order of seconds. However the matrix is even much simpler than > that and even the inverse is computed immediately. > > > > > > Robert Bradshaw <rober...@math.washington.edu> Dec 17 04:35PM -0800 > > The speed could be do to the inefficiency of fraction field arithmetic > over the polynomial ring. Ideally, we should have fraction-free > gaussian elimination. Also, easily invertable/small determinant may > actually be worse--as it could be creating a lot of large intermediate > values with non-trivial gcds that are all canceling out. > > It would be interesting to profile and see what exactly is taking all > the time. > > - Robert > > On Dec 17, 2009, at 11:39 AM, Christian Szegedy wrote: > > > > > > Christian Szegedy <christian.szeg...@gmail.com> Dec 17 05:58PM -0800 > > It is impossible to come up with any reasonable explanation for this > kind of slowdown. Even if you do extremely stupid things like > summing all permutations and simplifying the expression at the end, you > can't get that slow. > > Additionally, you cansee that the inverse is computed readily. If you > look at the > entries of the inverse, you can see the determinant in almost every > nonzero entry as denominator (naturally...) It is completely > implausible > that the inverse() function which essentially computes the determinant > (and a lot more) is magnitudes faster than computing the determinant > alone. > > I have not seen a ticket opened for this issue, but I would strongly > suggest > to open one (I don't have any account for the Trac, but would be happy > to > get one.) > > > > > > William Stein <wst...@gmail.com> Dec 17 06:05PM -0800 > > On Thu, Dec 17, 2009 at 5:58 PM, Christian Szegedy > > > I have not seen a ticket opened for this issue, but I would strongly > suggest > > to open one (I don't have any account for the Trac, but would be > happy to > > get one.) > > Wonderful. Please read http://wiki.sagemath.org/TracGuidelines and > email me offlist for your account. Thanks again for improving the > quality of Sage through your very valuable bug reports. > > William > > > > > Robert Bradshaw <rober...@math.washington.edu> Dec 17 06:35PM -0800 > > On Dec 17, 2009, at 5:58 PM, Christian Szegedy wrote: > > > summing all permutations and simplifying the expression at the end, > > you > > can't get that slow. > > No, but if someone tried to be clever, and messed up, you can. > > > to open one (I don't have any account for the Trac, but would be > > happy to > > get one.) > > That would be great. This intrigued me, so I hunted down where it's > hanging. It is trying to take a gcd in fraction field reduction. See > http://sage.math.washington.edu/home/robertwb/det.sage > for the hanging example. > > > > > > William Stein <wst...@gmail.com> Dec 17 07:28PM -0800 > > On Thu, Dec 17, 2009 at 7:16 PM, Sebastian Pancratz > > Dear William, > > > This is just a very brief reply (before going to bed, it's past 3am > here). I've added the bug report as ticket #7730. > > http://trac.sagemath.org/sage_trac/ticket/7730 > > > Computation of inverse: 71.6ms > > > Oh, and the output in either case for the determinant is > x1^2*x4^2*x5^2*x6^2 + x0^2*x2^2*x3^2*x7^2, which is different from the bug > report. (It looks like the powers of two were omitted in the bug report.) > > > While I am not all that familiar with the Hessenberg form > computation, I am happy to look at it in the next few days --- it seems > something that is used that often shouldn't be broken. > > Thanks! I think I implemented Hessenberg form long, long ago > following H. Cohen's book.... The generic algorithm is fine, so > something must go wrong/weird in the special case under consideration. > > William > > > > Topic: divide > polynomials<http://groups.google.com/group/sage-support/t/c786de5c6d13b600> > > Pablo Angulo <pablo.ang...@uam.es> Dec 17 06:18PM +0100 > > And also: > > sage: p//q > t - 5/6 > > sage: p%q > -11/18 > > > > > "ma...@mendelu.cz" <ma...@mendelu.cz> Dec 17 10:29AM -0800 > > Thanks! Is there faster way how to tell Sage that we want to divide > polynomials than these commands? I mean, if the third line can be > omitted. > > p=x^2+x+5 > q=x-4 > R.<x>=QQ[] > R(p).quo_rem(q) > > Robert. > > > > > > William Stein <wst...@gmail.com> Dec 17 01:21PM -0800 > > > q=x-4 > > R.<x>=QQ[] > > R(p).quo_rem(q) > > > No. But you have the order a little wrong (though what you write > will work). It should be: > > R.<x> = QQ[] # or x = polygen(QQ) > p = x^2 + x + 5 > q = x - 4 > p.quo_rem(q) > > William > > > > Topic: Was: Graph plotting and > labels<http://groups.google.com/group/sage-support/t/376b68e7e8fb236c> > > Christian Szegedy <christian.szeg...@gmail.com> Dec 17 11:55AM -0800 > > Not an answer, but a side question (probably belongs to sage-devel, > anyhow...) > > Why would you use BDDs in the first place? > For almost any applications, SAT-solvers beat BDDs by large margins, > and also have incremental implementations. One of the best (also > insustrially used) > SAT solvers: MiniSAT is available under the permissive MIT license. > > > > > > > David Joyner <wdjoy...@gmail.com> Dec 17 03:53PM -0500 > > On Thu, Dec 17, 2009 at 2:55 PM, Christian Szegedy > > and also have incremental implementations. One of the best (also > > insustrially used) > > SAT solvers: MiniSAT is available under the permissive MIT license. > > FYI, there has been some efforts towards creating a minisat spkg: > http://trac.sagemath.org/sage_trac/ticket/418 > http://trac.sagemath.org/sage_trac/ticket/5671 > > > > > > > William Stein <wst...@gmail.com> Dec 17 01:11PM -0800 > > On Thu, Dec 17, 2009 at 11:55 AM, Christian Szegedy > > and also have incremental implementations. One of the best (also > > insustrially used) > > SAT solvers: MiniSAT is available under the permissive MIT license. > > There are probably some good reasons, given that Victor (the guy that > is wrapping CUDD) is an expert in applications of SAT solvers, > including MiniSAT. > > -- William > > > -- > William Stein > Associate Professor of Mathematics > University of Washington > http://wstein.org > > > > Topic: Graph plotting and > labels<http://groups.google.com/group/sage-support/t/83a9725b5c4344fc> > > VictorMiller <victorsmil...@gmail.com> Dec 17 11:28AM -0800 > > I'm in the middle of implementing SAGE classes for binary decision > diagrams using the library called CUDD (which is included in > Polybori). Each BDD is actually a labeled DiGraph. It's standard in > the BDD literature to draw pictures of the digraph as follows: > > the vertex label of a non-leaf is a decision node, and it's standard > to label it with the variable name. Note that the same variable may > appear in more than one node, so this is not the same as the vertex > labeling convention for DiGraph in sage. Each decision node also > always has two outgoing directed edges -- the true edge which is drawn > with a solid line, and the false edge with a dotted line. Is there a > way in the plotting package from graph to have different edge > rendering depending on some criterion? It would also be nice if the > graph package could be supplemented to allow extra labels to be > associated with each vertex (besides its unique label), and to have an > option for plot of just printing the extra information. It's also > traditional in the BDD literature to print the leaves (terminal nodes) > with boxes around them instead of circles. > > What do people think about some way of enriching the graph package to > allow such things? > > Victor > > > > Topic: Save to .sage > file<http://groups.google.com/group/sage-support/t/912cea7790c9d8bc> > > Gennaro Alphonse <gena...@gmail.com> Dec 17 10:46AM -0800 > > Thanks for the helping, it was very useful, and yes that answers my > questions, but well I have another question. There is a command in > sage that is similar or equal to the fscanf function that exists for > example in matlab ? > > > Thanks for the attention again. > > > --Genaro > > > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com<sage-support%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org