edgecolor='none') plt.scatter(ra * RAD, dec * RAD, c='k') plt.scatter(ra_sat * RAD, dec_sat * RAD, s=80) plt.grid(True) plt.xlabel(r'$\alpha$') plt.ylabel(r'$\delta$') plt.xlim([0, 360]) plt.ylim([-90, 90]) CSun = plt.contourf(ra_grid * RAD, dec_grid * RAD, distance_sun) plt.gca().xaxis.set_major_locator(MaxNLocator(nbins=13)) plt.gca().yaxis.set_major_locator(MaxNLocator(nbins=7)) current_date = minute * 60. + timestamp_2018_01_01 current_date = figures.format_second(time.gmtime(current_date)) plt.text(0.01, 0.96, current_date, transform=ax.transAxes) plt.show() if save: fname = '%sdist_earthlimb_%07d' % (folder_figures, minute) plt.savefig(fname + '.png', dpi=param.dpi) if (fancy): plt.savefig(fname + '.eps') os.system("epstopdf " + fname + ".eps") os.system('pdfcrop ' + fname + '.pdf') os.system('mv ' + fname + '-crop.pdf ' + fname + '.pdf') os.system('pdftocairo -png ' + fname + '.pdf' + ' ' + fname) minute += 1 plt.close()
t = np.linspace(param.magnitude_min, param.magnitude_max, (param.magnitude_max - param.magnitude_min + 1), endpoint=True) plt.colorbar(ticks=t) scat.remove() plt.grid(True) # add the time, the orbit number and the stray light angle. # convert epoch to matplotlib float format labels = minute * 60. + const.timestamp_2018_01_01 # to human readable date pre = time.gmtime(labels) labels = figures.format_second(pre) orbit_current = fast_minute2orbit(times, minute, orbit_id) plt.text(-0.1, 1.0, '%s' % labels, transform=ax.transAxes) plt.text(-0.1, 0.9, r'$\mathrm{orbit}\ %d$' % orbit_current, transform=ax.transAxes) # plt.text(-0.1, 0.8,r'$\mathrm{id}\ %d$' % orbit_id, transform = ax.transAxes) if future: plt.show() exit() if not save: plt.show()
scat=plt.scatter(ra,dec,c=S_sl, s=2,vmin=param.magnitude_min, vmax=v[-1]) t = np.linspace(param.magnitude_min,param.magnitude_max, (param.magnitude_max-param.magnitude_min+1), endpoint=True) plt.colorbar(ticks=t) scat.remove() plt.grid(True) # add the time, the orbit number and the stray light angle. # convert epoch to matplotlib float format labels = minute * 60. + const.timestamp_2018_01_01 # to human readable date pre = time.gmtime(labels) labels = figures.format_second(pre) orbit_current = fast_minute2orbit(times,minute,orbit_id) plt.text(-0.1, 1.0,'%s' % labels, transform = ax.transAxes) plt.text(-0.1, 0.9,r'$\mathrm{orbit}\ %d$' % orbit_current, transform = ax.transAxes) # plt.text(-0.1, 0.8,r'$\mathrm{id}\ %d$' % orbit_id, transform = ax.transAxes) if future: plt.show() exit() if magnitudes: fname = '%s/flux_%07d' % (folder_figures, minute) else: fname = '%s/straylight_%07d' % (folder_figures, minute) if (fancy): plt.savefig(fname+'.eps')
plt.scatter(LIMIT[:,0]*RAD,(LIMIT[:,1])*RAD,color="red", s=8, edgecolor='none') plt.scatter(ra*RAD,dec*RAD,c='k') plt.scatter(ra_sat*RAD,dec_sat*RAD,s=80) plt.grid(True) plt.xlabel(r'$\alpha$') plt.ylabel(r'$\delta$') plt.xlim([0, 360]) plt.ylim([-90,90]) plt.gca().xaxis.set_major_locator( MaxNLocator(nbins = 13) ) plt.gca().yaxis.set_major_locator( MaxNLocator(nbins = 7) ) current_date = minute * 60. + timestamp_2018_01_01 current_date = figures.format_second(time.gmtime(current_date)) plt.text(0.01, 0.96,current_date, transform = ax.transAxes) fname = '%sdist_earthlimb_%07d' % (folder_figures, minute) plt.savefig(fname+'.png', dpi=param.dpi) if (fancy): plt.savefig(fname+'.eps') os.system("epstopdf "+fname+".eps") os.system('pdfcrop '+fname+'.pdf') os.system('mv '+fname+'-crop.pdf '+fname+'.pdf') os.system('pdftocairo -png '+fname+'.pdf'+' '+fname) minute += 1 plt.close() del LIMIT, ra, dec, S_sl, points, LIMIT_e