Traruh Synred

55 Reputation

3 Badges

8 years, 310 days

MaplePrimes Activity


These are questions asked by Traruh Synred

Is there a simple 4-vector package available for Maple? Yes, I know about using Tensors, but don't want to fool with metrics and raising and lowering operators.

I have written my  own, but it seems buggy. I generate some vectors in in CM that should add up to a massless neutrino, but some times when I boost them to the 'lab' and do the addition there the neutrion acquires a substantial mass. It's not a merely numerical issue. It's weird because most of the time the neutrion mass is 0 or close to it.

My homemade boost proc 'boostTo' is attached.

I have been using 'MemoryInUse()' to try to track down a memory leak that is crashing my Maple-based simulation. The problematic proc seems to be ProbDStarLNu which calculates the probablity of decay as a function of the angles of the decay product. It gets called a lot in acceptance rejection decay generation.

'MemoryInUse()' slows it down a lot. It also seemed to give weird results to me. I calculate the mem used on entry and then after the 4 trig functions have been called. The amount of mem 'in use' goes down after the trig functions are called. I was suspecting they were the source of the leak, but they seem almost an anti-leak.

This weird behavior caused me to write my own mem counting proc ('memUsed') based on summing over the results of 'mem:= kernelopts(memusage)'.

It is much faster. It gives nearly but not quite the same numbers. It still goes "backward" when the trig functions are called. Most of the mem growth comes from the algebra that follows the trig.

Why would that be?

I have included code for 'ProbDStarLNu'. It's pretty simple.

I'm trying to use CodeTools[Profile] to investigate my memory leak and the effect or lack there of of 'forget' to improve it.

I copied my code from an example:

with(CodeTools[Profiling]);
 [Allow, Build, Coverage, GetProfileTable, Ignore, IsProfiled, 

   LoadProfiles, Merge, PrintProfiles, Profile, Remove, 

   SaveProfiles, Select, SortBy, UnProfile]

Profile([PickAngles(1.0, 1.0, 1.0)]);
Error, (in CodeTools:-Profiling:-Profile) unexpected argument(s)

The 'unexpected argument' is the 'result' from 'PickAngles'. I've tried with and w/o the '[]' but it does the same thing failing to recognize that 'PickAngles' is a procedure.

The example I used is here:

https://www.maplesoft.com/support/help/maple/view.aspx?path=CodeTools%2FProfiling%2FProfile procedure.

I did what to make of the subscript Profiles in the example so I used '[Profiles]' and that worked or seemed to.

When I hit the debug button the debugger does not start. Putting Debug() in the code doesn't either. Is there some initiation I'm missing? It seems to me it used to work.

I have data that I've binned in list. I'd like to plot in as a histogram. 

dataplot sort of does it but doesn't give the x-axis that I used but just the bins.

Yes, I know about Histogram from Statistics. To plot 1000000 values I have to enter them all into a list which seems crazy when all I want is a 100 bin histogram. Doing the binning is trivial, but I can't figure out how to plot it with a sensible x-axis (show range used to define the 'histogram')

1 2 3 4 Page 3 of 4