
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (65)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (6285)
-
Archive download links
1er juin 2015, par scottschillerArchive download links
-
create a movie in python [closed]
23 mai 2017, par masoudI have some files with names (’Den_car_resample’ +’_ sdf_ ’+ str(n)+’.dat’) where n changes from 0 to 25. I wrote a code to read these files and plots the results.
now I want to create a movie from these plots. at the end of the program, I used the avconv command to do that.
but, unfortunately my code creates a movie but it is empty.
I don’t know the reason exactly but I think, first, I have to define a frame to each plot and then create a movie.
can anyone please tell me how can I define a frame and also the add bit_rate of the movie.import sys
import subprocess
import sdf
import numpy as np
import matplotlib.pyplot as plt
import time
import matplotlib.animation as Animation
from matplotlib.font_manager import FontProperties
fp = FontProperties('Symbola')
##################### information from EPOCH input.deck
nx,ny= 1200, 1600
xmin=-100e-6
xmax = 110e-6
ymin = -200e-6
ymax = 200e-6
X =np.linspace(xmin,xmax,nx)
Y =np.linspace(ymin,ymax,ny)
#################
for n in range(0,25):
nstr = str(n)
######################..... reading Density of carbon
filename ="Den_car_resample" +'_sdf_'+ str(n)+'.dat'
with open(filename, 'rb') as f:
data = np.fromfile(f, dtype='float64', count=nx*ny)
Den_car = np.reshape(data, [ny, nx], order='F')
Den_car= np.log10(Den_car)
###################### Display Carbon density
fig = plt.imshow(Den_car, extent=[X.min()*1e6, X.max()*1e6, Y.min()*1e6,Y.max()*1e6], vmin=24, vmax=29, cmap='brg', aspect='auto')
plt.suptitle('Den_car')
plt.title('sdf '+ str(n)+'; Time= '+str(n*50)+'ps',color='green', fontsize=15)
plt.xlabel('x($\mu$m)')
plt.ylabel('y($\mu$m)')
plt.text(-80,-40,'Den_Carbon',color='red', fontsize=15)
plt.colorbar()
plt.savefig( 'fig%06d.png' % n, bbox_inches='tight')
plt.pause(.1)
plt.clf()
plt.close()
###################### Create movie
subprocess.call("avconv -framerate 1 -i fig%06d.png -c:v libx264 -profile:v high -crf 20".split())
sys.exit() -
create a movie in python [on hold]
22 mai 2017, par masoudI have some files with names (’Den_car_resample’ +’sdf’+ str(n)+’.dat’) where n changes from 0 to 25. I wrote a code to read these files and plots the results.
now I want to create a movie from these plots. at the end of the program, I used the avconv command to do that.
but, unfortunately my code creates a movie but it is empty.
I don’t know the reason exactly but I think, first, I have to define a frame to each plot and then create a movie.
can anyone please tell me how can I define a frame and also the add bit_rate of the movie.import sys
import subprocess
import sdf
import numpy as np
import matplotlib.pyplot as plt
import time
import matplotlib.animation as Animation
from matplotlib.font_manager import FontProperties
fp = FontProperties('Symbola')
##################### information from EPOCH input.deck
nx,ny= 1200, 1600
xmin=-100e-6
xmax = 110e-6
ymin = -200e-6
ymax = 200e-6
X =np.linspace(xmin,xmax,nx)
Y =np.linspace(ymin,ymax,ny)
#################
for n in range(0,25):
nstr = str(n)
######################..... reading Density of carbon
filename ="Den_car_resample" +'_sdf_'+ str(n)+'.dat'
with open(filename, 'rb') as f:
data = np.fromfile(f, dtype='float64', count=nx*ny)
Den_car = np.reshape(data, [ny, nx], order='F')
Den_car= np.log10(Den_car)
###################### Display Carbon density
fig = plt.imshow(Den_car, extent=[X.min()*1e6, X.max()*1e6, Y.min()*1e6,Y.max()*1e6], vmin=24, vmax=29, cmap='brg', aspect='auto')
plt.suptitle('Den_car')
plt.title('sdf '+ str(n)+'; Time= '+str(n*50)+'ps',color='green', fontsize=15)
plt.xlabel('x($\mu$m)')
plt.ylabel('y($\mu$m)')
plt.text(-80,-40,'Den_Carbon',color='red', fontsize=15)
plt.colorbar()
plt.savefig( 'fig%06d.png' % n, bbox_inches='tight')
plt.pause(.1)
plt.clf()
plt.close()
###################### Create movie
subprocess.call("avconv -framerate 1 -i fig%06d.png -c:v libx264 -profile:v high -crf 20".split())
sys.exit()