Skip to content

Commit

Permalink
add --numbanks
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Sep 5, 2024
1 parent 5038773 commit 8c2bd85
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions bin/mars_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
-O OBSNUM --obsnum OBSNUM The obsnum, something like 123456. No default.
-T TEMP --temperature TEMP Brightness temperature of the planet in K. [Default: 205]
-D DIAMETER --diameter DIAMETER Diameter of the planet in arcsec. [Default: 6.5]
-N NUMBANKS --numbanks NUMBANKS Number of banks to process [Default: 2]
-v --version Version
-h --help This help
Expand All @@ -16,6 +17,17 @@
The name mars_reduction does not imply only mars can be reduced. Any spherical object
with finite size and brightness temperature can be reduced by this script.
Here's an example of ephemeris diameters for mars:
https://astropixels.com/ephemeris/planets/mars2018.html
https://astropixels.com/ephemeris/planets/mars2024.html
2018-05-17 13.0
2018-05-20 13.4
2018-06-08 16.5
2018-06-11 17.0
2024-08-31 6.5
"""


Expand Down Expand Up @@ -72,10 +84,11 @@ def compute_the_residuals(v,xdata,ydata,data):
av = docopt(_help, options_first=True, version=_version)
print(av) # debug

obsnum = int(av['--obsnum']) # 121356
TMars = float(av['--temperature']) # 205
DMars = float(av['--diameter']) # RMars = 6.52/2 # August 31 2024
RMars = DMars / 2.0
obsnum = int(av['--obsnum']) # 121356
TMars = float(av['--temperature']) # 205
DMars = float(av['--diameter']) # RMars = 6.52/2 # August 31 2024
RMars = DMars / 2.0
numbanks = int(av['--numbanks']) # 2 (before 2023 use 1)

print("mars_reduction: %d %g %g" % (obsnum, TMars, DMars))

Expand All @@ -100,7 +113,12 @@ def compute_the_residuals(v,xdata,ydata,data):
pix0_list = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
bank_list = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]

for icount in range(32):
if numbanks == 2:
nbeams = 32
else:
nbeams = 16

for icount in range(nbeams):
pixel = pix_list[icount]
bank = bank_list[icount]
pixel0 = pix0_list[icount]
Expand Down

0 comments on commit 8c2bd85

Please sign in to comment.