Revision | 8880adc2f05d8e03cbcee07be81f106a11dfaa8a (tree) |
---|---|
Zeit | 2008-08-03 07:55:30 |
Autor | iselllo |
Commiter | iselllo |
I can now choose freely a second time span along which I can calculate
the kernel element.
@@ -41,7 +41,7 @@ | ||
41 | 41 | |
42 | 42 | sel_ker=s.arange(2) |
43 | 43 | sel_ker[0]=2 |
44 | -sel_ker[1]=2 | |
44 | +sel_ker[1]=3 | |
45 | 45 | |
46 | 46 | |
47 | 47 | sel_ker=sel_ker*1. #to get a floating point array |
@@ -329,6 +329,7 @@ | ||
329 | 329 | |
330 | 330 | p.clf() |
331 | 331 | |
332 | +p.save("residuals.dat",fitted_kernel[1]) | |
332 | 333 | |
333 | 334 | |
334 | 335 | fig = p.figure() |
@@ -347,5 +348,58 @@ | ||
347 | 348 | |
348 | 349 | p.clf() |
349 | 350 | |
351 | +#Now I do as above but I specify a time-span | |
352 | + | |
353 | +time_inf=0. | |
354 | +time_sup=100. | |
355 | + | |
356 | +time_span=s.where((time_coll>time_inf) & (time_coll<time_sup)) | |
357 | + | |
358 | + | |
359 | +fitted_kernel=residuals_eval(coll_dens[time_span], n_in_j[time_span], k_ij_inf, k_ij_sup, n_steps) | |
360 | + | |
361 | +print "fitted_kernel is, ", fitted_kernel[0] | |
362 | + | |
363 | + | |
364 | + | |
365 | + | |
366 | +fig = p.figure() | |
367 | +axes = fig.gca() | |
368 | + | |
369 | + | |
370 | +axes.plot(time_coll[time_span],coll_dens[time_span], "bo", label="n_ij") | |
371 | + | |
372 | +axes.plot(time_coll[time_span],fitted_kernel[0]*n_in_j[time_span], "k^", label="k_{ij}n_in_j") | |
373 | + | |
374 | + | |
375 | +p.xlabel('Time') | |
376 | +p.ylabel('i-mers and j-mers collisions per unit volume and time') | |
377 | +#p.title("Evolution Mean-free path") | |
378 | +p.grid(True) | |
379 | +cluster_name="i-mers_and_j-mers_collisions_and_fit_vs_time_time_span.pdf" | |
380 | +axes.legend() | |
381 | +p.savefig(cluster_name) | |
382 | + | |
383 | +p.clf() | |
384 | + | |
385 | + | |
386 | + | |
387 | +fig = p.figure() | |
388 | +axes = fig.gca() | |
389 | + | |
390 | + | |
391 | +axes.plot(s.linspace(k_ij_inf,k_ij_sup, n_steps),fitted_kernel[1], "bo", label="residuals") | |
392 | + | |
393 | +p.xlabel('Value of k_{ij}') | |
394 | +p.ylabel('Squared sum of the residuals') | |
395 | +#p.title("Evolution Mean-free path") | |
396 | +p.grid(True) | |
397 | +cluster_name="residuals_vs_k_ij_time_span.pdf" | |
398 | +axes.legend() | |
399 | +p.savefig(cluster_name) | |
400 | + | |
401 | +p.clf() | |
402 | + | |
403 | +p.save("residuals_span.dat", fitted_kernel[1]) | |
350 | 404 | |
351 | 405 | print "So far so good" |