Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Tooley committed Apr 23, 2019
2 parents 6c5b118 + cad771d commit c77125a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions benchmarking/pfire_benchmarking/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,32 +193,32 @@ def main():
shirt_map = fio.load_map(shirt_result.map_path)[0][0:3]
pfire_map = load_pfire_map(pfire_result.map_path)

print("Map correlation coefficients, per dimension:")
print("Map coefficients of determination (R^2), per dimension:")


plt.plot(shirt_map[0].flatten(), marker='x', ls='none', label="ShIRT")
plt.plot(pfire_map[0].flatten(), marker='+', ls='none', label="pFIRE")
corr_info = sps.linregress(shirt_map[0].flatten(), pfire_map[0].flatten())
print("X: {:0.3}".format(corr_info[2]))
plt.title("Map X component, R={:0.3}".format(corr_info[2]))
print("X: {:0.3}".format(corr_info[2]**2))
plt.title("Map X component, R^2={:0.3}".format(corr_info[2]**2))
plt.legend()
plt.savefig("{}_map_x.png".format(os.path.splitext(args.pfire_config)[0]))
plt.close()

plt.plot(shirt_map[1].flatten(), marker='x', ls='none', label="ShIRT")
plt.plot(pfire_map[1].flatten(), marker='+', ls='none', label="pFIRE")
corr_info = sps.linregress(shirt_map[1].flatten(), pfire_map[1].flatten())
plt.title("Map Y component, R={:0.3}".format(corr_info[2]))
print("Y: {:0.3}".format(corr_info[2]))
plt.title("Map Y component, R^2={:0.3}".format(corr_info[2]**2))
print("Y: {:0.3}".format(corr_info[2]**2))
plt.legend()
plt.savefig("{}_map_y.png".format(os.path.splitext(args.pfire_config)[0]))
plt.close()

plt.plot(shirt_map[2].flatten(), marker='x', ls='none', label="ShIRT")
plt.plot(pfire_map[2].flatten(), marker='+', ls='none', label="pFIRE")
corr_info = sps.linregress(shirt_map[2].flatten(), pfire_map[2].flatten())
plt.title("Map Z component, R={:0.3}".format(corr_info[2]))
print("Z: {:0.3}".format(corr_info[2]))
plt.title("Map Z component, R^2={:0.3}".format(corr_info[2]**2))
print("Z: {:0.3}".format(corr_info[2]**2))
plt.legend()
plt.savefig("{}_map_z.png".format(os.path.splitext(args.pfire_config)[0]))
plt.close()
Expand Down
2 changes: 2 additions & 0 deletions benchmarking/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
url='insigneo.org',
packages=find_packages(''),
include_package_data=True,
install_requires=['numpy', 'scipy', 'h5py', 'matplotlib', 'flannel',
'configObj'],
entry_points={
'console_scripts': [
'pfire-shirt-compare = pfire_benchmarking.validate:main',
Expand Down

0 comments on commit c77125a

Please sign in to comment.