-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Amir Souri
committed
Sep 22, 2022
1 parent
fbb3640
commit ee44c2b
Showing
1 changed file
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,13 +80,13 @@ def gray_scale(self,random_selection_n=None): | |
ax.imshow(mair_gscale,origin='lower', | ||
extent = [np.nanmin(mair_lon.flatten()), np.nanmax(mair_lon.flatten()), | ||
np.nanmin(mair_lat.flatten()), np.nanmax(mair_lat.flatten())], | ||
interpolation='nearest',aspect='auto',cmap=mpl.colormaps['bone']) | ||
interpolation='nearest',aspect='auto',cmap=mpl.colormaps['viridis']) | ||
|
||
# plotting msi | ||
ax.imshow(msi_gscale,origin='lower', | ||
extent = [np.nanmin(msi_lon.flatten()), np.nanmax(msi_lon.flatten()), | ||
np.nanmin(msi_lat.flatten()), np.nanmax(msi_lat.flatten())], | ||
interpolation='nearest',aspect='auto',alpha=0.3,cmap=mpl.colormaps['bone']) | ||
interpolation='nearest',aspect='auto',alpha=0.3,cmap=mpl.colormaps['viridis']) | ||
|
||
# plotting costlines | ||
ax.coastlines(resolution='50m', color='black', linewidth = 2) | ||
|
@@ -170,7 +170,7 @@ def topdf(self): | |
''' | ||
save all pngs to a pdf report | ||
''' | ||
def header(pdfobj,title,fsize=8): | ||
def header(pdfobj,title,fsize=22): | ||
# Arial bold 15 | ||
pdfobj.set_font('Arial', 'B', fsize) | ||
# Calculate width of title and position | ||
|
@@ -184,7 +184,8 @@ def header(pdfobj,title,fsize=8): | |
pdfobj.cell(w, 9, title, 1, 1, 'C', 1) | ||
# Line break | ||
pdfobj.ln(10) | ||
|
||
return w | ||
|
||
def body(pdfobj,bd1): | ||
# Times 12 | ||
pdfobj.set_font('Times', '', 12) | ||
|
@@ -202,11 +203,13 @@ def body(pdfobj,bd1): | |
# call the fpdf obj | ||
pdf = FPDF() | ||
pdf.add_page() | ||
title = 'The Orthorectification QA/QC Report generated by the GEOAKAZE tool' | ||
pdf.set_font('Arial', 'B', 16) | ||
pdf.cell(188, 100, txt = title, border = 0, ln = 1, align = "C") | ||
pdf.cell(180, 20, txt = 'Amir H. Souri', border = 0, ln = 1, align = "C") | ||
pdf.cell(180, 20, txt = 'Contact: [email protected]', border = 0, ln = 1, align = "C") | ||
pdf.add_page() | ||
|
||
title = "The Orthorectification QA/QC Report generated by the GEOAKAZE tool" | ||
w = header(pdf,title,fsize=20) | ||
pdf.line(w, 30, 110, 30) | ||
pdf.cell(w+2, 9, "Contact: [email protected]", 1, 1, 'C', 1) | ||
# printing kmz paths | ||
w = header(pdf,"KMZ files") | ||
for fname in geoakaze_kmz_fnames: | ||
|
@@ -217,19 +220,19 @@ def body(pdfobj,bd1): | |
w = header(pdf,"MAIR grayscales") | ||
grayscale_png = sorted(glob.glob(self.temp_fld + '/*_grayscale.png')) | ||
for fname in grayscale_png: | ||
pdf.image(fname,10,w,180,200) | ||
pdf.image(fname,10,w-50,180,200) | ||
pdf.add_page() | ||
|
||
# printing trajectory | ||
w = header(pdf,"Flight Path") | ||
traj_png = glob.glob(self.temp_fld + '/traj*.png') | ||
pdf.image(traj_png[0],10,w,200,220) | ||
pdf.image(traj_png[0],10,w-10,200,220) | ||
|
||
# printing histogram | ||
pdf.add_page() | ||
w = header(pdf,"Histogram of Shifts") | ||
traj_png = glob.glob(self.temp_fld + '/hist*.png') | ||
pdf.image(traj_png[0],10,w,200,220) | ||
pdf.image(traj_png[0],10,w-50,200,220) | ||
|
||
#writing | ||
pdf.output(self.output_pdf, 'F') |