Skip to content

Commit

Permalink
Merge pull request #19 from ewanwm/feature_logo
Browse files Browse the repository at this point in the history
Feature logo
  • Loading branch information
ewanwm authored Jul 12, 2024
2 parents c7efd88 + 0afffab commit b5eafcb
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 4 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# nuTens


# nuTens

A lightweight library for calculating neutrino oscillation probabilities using tensors typically used in machine learning.

[![example workflow](https://github.com/ewanwm/nuTens/actions/workflows/CI-build-and-test.yml/badge.svg)](https://github.com/ewanwm/nuTens/actions/workflows/CI-build-and-test.yml)
<img src="doc/nuTens-logo.png" alt="nuTens" class="right" align="top" width="400"/>

[![CI badge](https://github.com/ewanwm/nuTens/actions/workflows/CI-build-and-test.yml/badge.svg)](https://github.com/ewanwm/nuTens/actions/workflows/CI-build-and-test.yml)
[![Code - Doxygen](https://img.shields.io/badge/Code-Doxygen-2ea44f)](https://ewanwm.github.io/nuTens/index.html)
4 changes: 2 additions & 2 deletions doc/doxygen.config
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO =
PROJECT_LOGO = doc/nuTens-logo-small.png

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand Down Expand Up @@ -1213,7 +1213,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET =
HTML_EXTRA_STYLESHEET = doc/tweaks.css

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand Down
80 changes: 80 additions & 0 deletions doc/logo-generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import Ellipse

# Function to draw a stylized neutrino wave with higher amplitude on the left
def draw_wave(ax, colour):
x = np.linspace(0, 11.5, 320)
y = np.sin(3*x) * 1.9 + 1.9
y *= (1.0 - x/(2*np.pi))**3
y += 0.95
y[100:] = 0.95
ax.plot(x + 1, y, color=colour, lw=4)

def draw_other_waves(ax, colour_1, colour_2):
x = np.linspace(0, 3, 100)

y_main = ( np.sin(3*x)) * 1.9 + 1.9
y_main *= (1.0 - x/(2*np.pi))**3

# scaling between line1 and line2
w = (np.sin(2.75*x/3 -1.45) *0.5 +0.5) **1.5

# more prominent line
y = (3 - y_main[:100])
y *= (1 - w)
y += 0.95

# less prominent
z = (3 - y_main[:100])
z *= w
z += 0.95

# add some lil wiggles, kinda matter oscillation-y
h = ( x/3 ) *0.055 * np.sin(50*x)

ax.plot(x + 1, z*(1-h), color=colour_2, lw=2)
ax.plot(x + 1, y*(1+h), color=colour_1, lw=3)

# Function to draw a grid, kinda tensor-y
def draw_grid(ax, colour):
for i in range(1, 5):
for j in range(1, 5):
circle = Ellipse((i, j), 0.2, 0.2, color=colour)
ax.add_patch(circle)

# Define mellow colours
mellow_blue = '#4c96c2'
mellow_green = '#a9db6e'
mellow_orange = '#c28d4c'
mellow_red = '#c2504c'
mellow_purple = '#9983c7'

# Create a figure
fig, ax = plt.subplots(figsize=(8, 4))


# Draw the adjusted neutrino wave with mellow blue
draw_other_waves(ax, mellow_orange, mellow_red)

# Draw the adjusted neutrino wave with mellow blue
draw_wave(ax, colour=mellow_blue)

# Draw the modern tensor grid with mellow green
draw_grid(ax, colour=mellow_green)

# Add the text with the Greek letter ν in mellow dark blue and larger font size
ax.text(8.45, 2.0, 'νTens', fontsize=92, fontweight='bold', color=mellow_purple, va='center', ha='center', family='sans-serif')

# Set limits and remove axes
ax.set_xlim(0.85, 12.5) ## ax.set_xlim(0, 9)
ax.set_ylim(0.85, 4.15) ## ax.set_ylim(-0.5, 5.5)
ax.set_aspect(9/9)
ax.axis('off')

# Save the updated logo with the adjustments
plt.savefig('nuTens-logo.png', dpi=300, bbox_inches='tight', transparent=True)

#print("figure size = ", plt.gcf().get_size_inches())

plt.savefig('nuTens-logo-small.png', dpi=50, bbox_inches='tight', transparent=True)
Binary file added doc/nuTens-logo-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/nuTens-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/tweaks.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#projectname {display:none}

0 comments on commit b5eafcb

Please sign in to comment.