Team Updates

letangle=0;
letmodel_1;
functionsetup(){
createCanvas(windowWidth,windowHeight,WEBGL);
}
functionpreload(){
model_1=loadImage('texture.png');
}
functiondraw(){
dx=mouseX-width/2;
dy=mouseY-height/2;
letl=createVector(dx,dy,0);
l.div(100);
l.normalize();
ambientLight(0,0,255);
directionalLight(255,225,0,l);
background(170);
//rotateX(angle);
//translate(0, 0, 0);
push();
rotateZ(angle*1.3);
rotateX(angle);
rotateY(angle*0.2);
//fill(200,0,255);
noStroke();
ambientMaterial(255);
torus(100,100,4);
pop();
angle+=0.03;
}
anjalishivaniT.Anjali Shivani Reddy
sim=pyLCSIM.Simulation()
sim.addModel('smoothbknpo', [1., 1, 2, 1])
sim.addModel('lorentzian', [10., 1., 10, 2])
# Run the simulation
sim.run(dt, nbins, rate_src, rms=frms)
# Add Poisson noise to the light curve
sim.poissonRandomize(dt, rate_bkg)
# Get lightcurve and power spectrum as 1-D arrays
time, rate=sim.getLightCurve()
f, psd=sim.getPowerSpectrum()
pyLCSIM.saveFITSLC("myLC.fits", time, rate)
pyLCSIM.saveFITSPSD("myPSD.fits", f, psd)
fig0=plt.figure()
plt.plot(time, rate)
plt.xlabel("Time [s]")
plt.ylabel("Rate [counts/s]")
plt.title("Lightcurve")
fig1=plt.figure()
plt.loglog(f, psd, drawstyle='steps-mid', color='black')
plt.xlabel("Frequency [Hz]")
plt.ylabel("PSD [Leahy normalized]")
plt.title("Power spectrum density")
plt.show()
anjalishivaniT.Anjali Shivani Reddy