To compile the program ashi_hr_maker type: make ./ashi_hr_maker On 09/06/2022 I began the program: ashi_hr_maker.f This program is the main program that calls subroutine: read_ashi_track.f that reads the ASHI track provided by CSBF It also calls a program interpolate_ashi_track.f that interpolates the ASHI track to the location of the time of the ASHI image file designated by a time with the index 1, 2, 3, etc. of the image files available for ASHI that are taken from the ASHI computer. The program ashi_hr_maker.f also calls the subroutine: sidereal.f that calculates the sideral time at the ASHI location using the longitude of ASHI to determine the local time, amnd the length sidereal time passage since the vernal equniox. The program ashi_hr_maker.f also determines the location of the Hour Angle in degrees of a specific star and its distance from the north pole in degrees knowing the declination of the Star. THis analysis works for polaris, and any other star that is input. compiled with Intel Fortran v10.0 dynamically linked to libcfitsio (http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html) directories 32bit and 64bit include Earth Parameter output files for 32bit and 64bit runs of -O0 binaries with all options default except the output options, no 3D files are outputted and only Earth Parameter outputs are set to YES, they should be the same even if 3D files are outputted (all defaults) ipstd_20n is the prebuilt dynamically linked 32bit binary ipstd_20n_intel64 is the prebuilt dynamically linked 64bit binary On 2022_09_03 I (BVJ) began the process of reducing the ASHI images. This began with the 722NTflight.rpt that was downloaded that gives the locations of ASHI in latitude and longitude over time. On 2022_09_07 The way to provide Sidereal time was begun by downloading Matthew's file: sidereal_time.f In addition image_times/txt was downloaded On 2022_09_08 ashiimages1.txt was downloaded and interpolate_lon.f was produced, and Polaris_____centroids.txt was downloaded from Matthew. On 2022_09_09 I produced the subroutine: sidereal.f On 2022_09_10 I produced the file sta01_t_x_x.txt which gives the times and x y values of the Polaris? for each ASHI image On 2022_09_12-13 I downloaded a sets of stellar centroids. On 2022_09_15 the file extrema.txt and extrema_Polaris.txt was produced. This gives the extreme x, y positions of Polaris from its centroids on the balloon images. On 2022_09_16 a subroutine: find_min_max.f was created to automatically find the minimum and maximum of the Polaris extreme positions and print_distcdiff.f was produced. On 2022_09_20-21 the subroutines: interpolate_latlon.f, readashi_track.f, readimagetimes.f were produced, and the files center_rot.txt, and center_rot_2.txt were produced On 2022_09_25 the subroutine: print_max_determine.f was produced. On 2022_09_27 the subroutines: nsew_max.f print_lat_lon.f were made and the files XYmax_min_rot.txt, and interpolated_lat_lon.txt were produced. On 2022_09_29 the program: sidereal_t.f was made. On 2022_10_04-05 the programs: print_star_pole_xy_rot.f print_cent_rot.f print_star_pole_cen_xy_rot.f were produced, and the files polaris_pole_xy_rot.txt and print_star_pole_cen_xy_rot.txt were made. On 2022_10_07 Saturn_______centroids.txt was downloaded from Matthew. On 2022_10_12 all the stellar images from ASHI were downloaded in a large zip file, and the file brightstars.txt was produced. On 2022_10_13 the programs: print_star_pole_cen_xy_st_rot.f pr_star_pole_cen_xy_dist_st_rot.f were produced, and the files print_star_pole_cen_xy_st_rot.txt pr_star_pole_cen_xy_dist_st_rot.txt were produced. On 2022_10_24 the file all_13_centroids_500.txt was produced. On 2022_10_26 the file Matthews_13_stars_and_distances.txt was produced On 2022_10_27 the subroutine: read_stellar_centroids.f was produced and the file pr_star_pole_cen_xy_dist_st_rot_2.txt was made. On 2022_11_04 the subroutine: pr_t_lat_lon_2rot_delt.f was produced and the file pr_t_lat_lon_2rot_delt.txt was produced. On 2022_11_06-08 the program: pr_t_lat_lon_2rot_delt_rm.f pr_star_pole_cen_xy_rm.f were produced and the files pr_t_lat_lon_2rot_delt_rm.txt, and pr_star_pole_cen_xy_rm.txt made. On 2022_11_09 the programs: ashi_hr_maker.f ashi_ratio.f were last compiled as: ashi_hr_maker_intel ashi_ratio_intel and the files ruler_points_1.txt, ruler_points_2.txt, ruler_points_3.txt, ruler_points_4.txt,ASHI_ratios_with_distance_m.txt, and 3rd_mag_centroids.txt made. On 2022_11_10 the files ashi_mag/txt, ashi_mag_last.txt, and ashi_mag_2.txt were made, and the files S10-ADU_ratio_vsS10.png, and S10_vs_Total_ADU.png were made, and ashimkag_last.xlsx was made. On 2022_11_18, the program: ashi_mag.f was made and last compiled as: ashi_mag_intel and Star_Brightnesses_500_3.txt, StarBright_500_3.txt, StarBright_500_32.txt made. On 2022_11_20, the subroutine: read_rot_rm_matc.f was produced. On 2022_12_02 Makefile was last modified, and the subroutine: read_cen_rm_bvjc.f was produced. On 2022_12_03, the subroutine: read_grd_image.f was produced. On 2022_12_22, the subroutine: rot_image_2pole.f was last modified, and the program: ashi_img_comb.f was last modified, compiled as: ashi_img_com_intel On 12_22_2022 I think I may have found the way to make the image into spherical coordinates. C Begin change the image to spherical coordinates with coordinate theta at the center of the image if(indx.ge.3) then distycl = PDIST(K) + distyc FVAL = 615.3846 ! 4.0/0.0065, the focal distance in pixels values AIXS = Xnew-distxc AJYS = Ynew-distyc DISS = sqrt(AIXS**2 + AJYS**2) RVAL = atand(DISS/FVAL)*DISS*0.0065 ! distance from the pole in pixels (This is not correct) PHIV = atan2d(AJYS,AIXS) ! angle around the pole in degrees Xnew = RVAL*cosd(PHIV) + distxc Ynew = RVAL*sind(PHIV) + distyc if(J.eq.nint(distycl).and.I.eq.nint(distxc)) then write(*,'(3(A,F8.1))'), 'indx = 3a, PDIS(K = ',PDIST(K),' DISS= ',DISS,' RVAL= ',RVAL write(*,'(A,F8.3,2(A,F8.1))'),'indx = 3b, PHIV = ',PHIV, ' Xnew= ',Xnew,' Ynew= ',Ynew end if end if C End change the image to spherical coordinates with coordinate theta at the center of the image C On 2023_02_24 I downloaded the above text from my email acount, and I have again begun to take up the task of producing the ASHI images with stars removed, and I have updated this readme file. On 2023_02_24 I will explain how the program works. The main explortory program is: ashi_hr_maker.f This program provided all the input files that tell how to rotate the balloon images and deal with them so that the pole is one location on the final analysis grid. This program gives a valid sidereal time for each image, This program tells how to rotate the pole to one location in the image. This program also determines (as well as possible) the pointing position center of the each image as the balloon rotates. This location wanders and is not the latitude of the balloon because the pointing location is slightly different from the rotation axis of the balloon. In ashi_hr_maker.f the program finds the Polaris extremma as the balloon rotates and determines the center from the extremma locations; this approximates the actual pixel location at the latitude and longitude location of the rotation center. The values given for image rotation and pixel locations are smoothed because of errors in determinimg the position of Polaris. These smoothed positions are given in the files with "rm" and are provided by a boxcar filtering technique using 7 values but this is setable. No values are given for the first 3 or last 3 ASHI images. Polaris is star #1 In pr_star_pole_cen_x-y_rm.txt Xvalrm and Yvalrm: are the smoothed Pole X and Y positions on each original ASHI image. PXvalrm and PYvalrm: are the smoothed Polaris X and Y positions on each ASHI image. XCENrm and YCENrm: are the smoothed X and Y pixel locations on each image of the RA and Dec given for the balloon from its latitude and longitude. In pr_t_lat_lon_2rot_delt_rm.txt JD: is the Julian date of the image in UT in the form of double precision days (this is also given in the form of hours, minutes and seconds of time on the date in question of 26 August, 2022) ST: is the sidereal time in degrees. lat and lon: is the latitude and longitude of the ASHI for each image Rotrm: is the mean rotation in degrees to place the pole at a single place on the final grid + is counterclockwise to pole. DRot: is the mean delta between each rotation amount in degrees + is clockwise RotSrm: is the mean rotation (HA-ST) from the center The program: ashi_ratio.f modified in 2022 11 08 provides a ratio of the angular distance from the image center to the pixel scale. The best way it does this is using the a hemispherical ruler that is imaged by the actual flight image. There is a slight difference between the angle from the image center and the plate scale. The program: ashi_mag.f provides a rough measurement of stellar magnitude for different identified stars on a single image on the image plane. program: ashi_img_com.f is a main program that puts all the information together to combine the positions of all image pixels in the ASHI image plane over time and combine and display them. This program first reads in the information needed to provide the rotation of the images, centroids, times, lat-long of the balloon, and so forth. The first part of the program also sets up the inputs needed to run the the remaining subroutines in the program. This program is complicated and needs some hads on to run. There are several indices that need to be set. *itype is an integer that tells the subroutine read_grd_image.f the type of file or input image to input or output *indx is an integer that tells the type of operation for the subroutine rot_image_2pole.f. *icycle tells the mode of how the program is to cycle through the sequence of reading images and processing them. *L11 and L22 are needed to set the indicies L1 and L2 to provide the sequence of numbers on each background file subtracted. The ashi_img_com.f program at the beginning can read then reads each ASHI of Matthew's minimum each image background of the specified composite, unrotated images that are required for the images specified early on that are to be processed by the program. These smooth background files are needed to remove the airglow from the ASHI images that is brighter at the edges of each image than at the center. They probably vary over time and are probably more uniform on the images that have been rotated so that north is to the top of each image. These files are called cfileibk and are given with a name that has 4 numbers specifying the beginning and ends of the original file names they were made from. These files are read in by the subroutine read program called: read_grd_image.f and are read with an ityp = 12 designation. The files currently used are made from 20 combined images each give as "Back" such as: ASHI_img_0101-01100_0111-0120_Back.grd. These files can then be witten out if wanted and dealt with up to the "1000 continue" cycle portion of the ashi_img_com.f program. If these files are already available then the first portion of this program can be skipped since the files can also be read in after the "1000 continue" statement. The ashi_img_com.f program then reads composite star images using the subroutine that are unrotated. These are named cfilei and found in ./ASHI_grd_files/ASHI_Flight_Grds/ASHI_img_00000.grd' These are the original unrotated image files and are read in using a itype = 2 designation, and placed in aimage(I,J,K) in memory. This one array can hold all the ASHI images in memory, but only one such file set can be designated as this large. After this read, the backgroud images can also be read in. Following the image reads in the ashi_img_com.f program the program goes into the subroutine: rot_image_2pole.f This subroutine does the hard work of making composite images by indx = 0 rotating each image pixel correctly indx = 1 shifting each image pixel corectly to the pole indx = 2 warping each image pixel to remove the center to edge non-umiformity of the lens indx = 3 subtracting the image background (Matthew's backgrounds have already had these earlier three changes imposed). After this each image pixel location is changed into spherical coordinates and the image pixels whose coordinates are all known are accumulated into an equal area composite image map. This program was used to provide the images that made those needed for Mathew's background and can still do this but was not used after this and has since the last portion has been superceeded by the subroutine: rot_image_2ra_dec.f This subroutine does the same thing as the previous subroutine, but it actually goes to indx > 3 Both the rot_image_2pole.f and the rot_image_2ra_dec.f only work on a single composite image and they do not put together a whole image set. The rot_image_2pole.f image set likewise needs to be preceeded by the single composite background image read for that image composite that is made. In this subroutine if a composite image is input then it does not need to be rotated or stretched (these are named cfileii and are input from ./ASHI_grd_files/ASHI_img_00XX-00XX_00XX-00XX_Stars.grd) In this case the subroutine is only used to only provide a composite stellar map in spherical coordinates from those maps that have already had the background map removed. The above, however comes after "1002 continue" and the following analysis sequence where if "icycle = 5" specific named StarT images are read in, subtracted, and then output as a single subtracted image after being converted into S10 units. This was a serious hack that was put in last minute to subtract the two named final halves of the data in order to check that the subtraction reached the appropriate S10 limit which it did almost. On 10/19/2023 I have written a program: ashi_flat_field.f that attempts to provide flat fields from the surounding white map that records data for the ASHI camera. At this point the flat field program works to determine the percentage multiplication of each pixel from the norm that is determined by providing the mean of an 11 by 11 pixel patch (settable however) around the center of each pixel. This shows a mean that is indeed smooth, but the percentage correction of each pixel still seem quite variable from each image, and when the mean correction of each pixel is applied to individual pixels of the images, the correction of each image does not seem to be much smoother when applied to another image set. At this date tests of this program are still ongoing.This program is rather sophisticated and allows known bad locations on the chip to be removed and has spots blanked out where there were locations on white screen shaded from the mechanism used to hold the light to provide a standard source for the images used in the flat-field work. Matthew also provides a similar program that intends to provide this same flat field response from his flat field work. On 10/20/2023 I have begun again to clean up the program: ashi_img_com.f In the old program version icycle = 5 was just used to read two input files made in earlier versions of the the program and subtact them. The only reason this was here was to use the read_grd_image.f subroutine already dimensioned The program might use the data directly produced by the ashi_img_com.f program, but this could better be done in a subroutine that was called mimicking this main program. Thus I have made a program: ashi_img_present.f that calls a subroutine: ashi_img.f that allows the gridfile image presentations of ASHI images made by the ashi_img_com.f program. On 10/19/2023 I have begun again to work on the program: ashi_img_com.f On 10/24/2023 I worked on the ashi img programs but have not gotten them to work I want to make grd combo files that are in heliographic coordinates, but I have forgotten how to run the ashi_img_comb_intel program so that it subtracts the base files. On 10/25/2023 I began again to understand how to run the ashi_img_comb_intel program. When I currently run the program as is it compiles and runs but only gets through the read_centxy program and writes out what is there and stops icycle = 0, indx = 3, ibak = 0, L11 = 2001, L22 = 2020, and then icycle = 5, ibak = 0 On line 225, after L11 and L22 is set I have now commented out icycle = 5. With this icycle = 1 is set after the read_centxy program. However, just after icycle = 5 ibak = 0, and so no background files are read. So now I make ibak = 1 and still the program wont run Ah location 133 had a stop placed there and I had to remove that. This was right after the location where PDIST is calculated. Why, I don't know. With the stop removed and the print statement after the PDIST calculation the program stops because there is no ./ASHI_grd_files/ASHI_img_2001-2010_2011-2020_Back.grd./ASHI_grd_file in this subdirectory The problem was in read_grd_image.f where cfilei was set cfile*69, and should have been set cfile*54. Humm, I wonder when this gives another problem but now the program seems to work as expected and reads background files. I now set ibak = 0 on line 226 About line 313 there is another 1000 continue, and here the images files are read as are the backgrounds they use before the subroutine call rot_image_2ra_dec I have now removed the part where cycle = 5 is gone through The program now reads ./ASHI_grd_files/ASHI_img_2001-2010_2011-2020_Stars.grd files at the beginning up to ./ASHI_grd_files/ASHI_img_4501-4510_4511-4520_Stars.grd and then goes into rot_image_2ra_dec from image 2010 to 4530 in steps of 20 and then says After image C 122 times and gives zeros in that line and then goes out of rot_image_2ra_dec tries to output ./ASHI_grd_files/ASHI_img_2001-2790_2901-4520_StarT.grd because it is already there. On 10/25/2023 I was able to get the program to work and provide ecliptic and heliographic sun centered images composited in subroutine rot_image_2ra_dec.f On 10/25/2023 I was able to certify these files provide the Sun at the center in both the ecliptic and heliographic plots, and also on the bottom half of the 2048 x 2048 map, and present these as grd files as 2048 x 1024 images in Surfer by placing the first lines as: DSAA 2048 1024 0 2048 0 1024 0 2000 (actually 20 1000) The top half of the image is quite a bit fainter than the part around the middle of the image, and while I don't know why, I expect it may have to do with zodiacal light being present around the ecliptic and partially removed (or mitigated) by the Earth glow removal technique. I can now proceed with the program: ashi_image_present.f and subroutines ashi_img.f and write_img_grd.f that intends to present, smooth, and write out the images as differences and Sun-centered fisheyes, or Hammer-Aitoffs. On 10/23/2024 I have written a journal article to Solar Physics. Andy and Matthew have provided inputs and comments, and only Mario Bisi has asked me to hold off submission until he can look over the text, which is a good idea. Other authors have said nothing. The final report for the LCAS proposal is due at the end of the year.