Advertisement
Jim421616

spec_phot_2

Jun 27th, 2021
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3. from matplotlib.pyplot import figure
  4. import matplotlib.pylab as pylab
  5.  
  6. # y1 = LRIS
  7. # y2 = PFCam
  8. # x1, x2 = log(t) in seconds
  9. y1 = np.array([20.03,20.53,21.02,21.52,21.99,22.50,22.98,23.50,23.97,24.44,24.93,25.47,25.95,26.46,26.91,27.41])
  10. x1 = np.array([0.1513,0.3976,0.6180,0.8643,1.110,1.421,1.744,2.119,2.494,2.843,3.270,3.632,4.020,4.420,4.847,5.235])
  11. F1 = 10**(-y1/2.5)*3640
  12.  
  13. y2 = np.array([17.98,18.48,19.00,19.49,19.98,20.49,21.00,21.53,21.99,22.46,22.98,23.48,23.97,24.42,24.96,25.44])
  14. x2 = np.array([0.4280,0.6356,0.9077,1.256,1.593,1.942,2.291,2.705,3.131,3.493,3.907,4.308,4.709,5.109,5.497,5.885])
  15. F2 = 10**(-y2/2.5)*3640
  16.  
  17. x1 = 10**x1; x2 = 10**x2 # convert x1, x2 to seconds
  18.  
  19. figure(figsize=(15, 10), dpi=80)
  20.  
  21. params = {'legend.fontsize': 'xx-large',
  22. 'axes.labelsize': 'xx-large',
  23. 'axes.titlesize':'xx-large',
  24. 'xtick.labelsize':'xx-large',
  25. 'ytick.labelsize':'xx-large'}
  26. pylab.rcParams.update(params)
  27.  
  28. ax1 = plt.subplot(1, 1, 1)
  29. ax1.scatter(x1, F1, label = 'LRIS: m = -0.50', marker = '*', c = 'r', s = 50)
  30. ax1.scatter(x2, F2, label = 'PFCam: m = -0.50', marker = 's', c = 'b', s = 50)
  31.  
  32. ax1.set_ylabel('Flux sensitivity, $\Delta S$ [Jy]')
  33. ax1.set_xlabel('Integration time [s]')
  34. ax1.set_xscale('log')
  35. ax1.set_yscale('log')
  36. ax1.grid(True)
  37.  
  38. ax2 = ax1.twiny()
  39. ax3 = ax1.twinx()
  40.  
  41. hours = [0.03, 0.28, 2.78, 27.8, 278]
  42. seconds = [1e2, 1e3, 1e4, 1e5, 1e6]
  43. # new_pos = seconds
  44. ax2.set_xscale('log')
  45. ax2.set_xticks(seconds)
  46. ax2.set_xticklabels(hours, rotation = 0)
  47. ax2.set_xlabel('Integration time [hours]')
  48. ax2.set_xlim(ax1.get_xlim())
  49.  
  50. WmHz = [1e-30, 1e-31, 1e-32, 1e-33]
  51. jansky = [1e-4, 1e-5, 1e-6, 1e-7]
  52. ax3.set_yscale('log')
  53. ax3.set_yticks(jansky)
  54. ax3.set_yticklabels(WmHz, rotation = 0)
  55. ax3.set_ylabel(r'Flux sensitivity [W m$^{-2}$ Hz$^{-1}$]')
  56. ax3.set_ylim(ax1.get_xlim())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement