-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating Docs folder and improving README. #131
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
94b9c1e
Clearing unused docs, adding proper paper.
cjrolo 6ed7b04
Merge branch 'main' into issue-101-docs
cjrolo d91c99c
Readme update, getting started, usage
cjrolo ed0ea5c
Improved README, adding VSRI Readme. Getting started.
cjrolo 875af1b
Fixed links, added releases section
cjrolo 748025c
Improved getting started, added information about WAVBRRO
cjrolo 7a262b1
Typos, WAVBRRO readme improvements
cjrolo a342e36
fix for Review comment
cjrolo 93c84e6
Merge branch 'main' of https://github.com/instaclustr/atsc into issue…
cjrolo 923e43a
Merge branch 'atsc-csv-support' of https://github.com/instaclustr/ats…
cjrolo 77d3681
Updated information related to CSV data
cjrolo 1e4f5bd
demo updated and modernized
cjrolo 4870332
Updated demos to output HTML Added CSV files for tests
cjrolo 701d6dd
added csv to the filename of demo csv output
cjrolo 6d61a12
Fixing comment, improving `-h` output and README
cjrolo 6792ba2
Fix for review
cjrolo 8d7aa6e
Merge branch 'main' into issue-101-docs
cjrolo a5021f0
Legacy tests removed Improved readme
cjrolo 9102e26
Merge branch 'main' into issue-101-docs
cjrolo ef74d1b
Fixed name typo
cjrolo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -1,58 +1,106 @@ | ||
#!/bin/bash | ||
infilename=$1 | ||
|
||
echo "Original Size: " | ||
du -sb $infilename | ||
|
||
for i in 1 3; | ||
do | ||
echo "### Error Level: $i"; | ||
mfile="comparison-error-$i.m" | ||
|
||
cp $infilename tmp.wbro | ||
|
||
../../target/debug/atsc --compressor fft --error $i --verbose tmp.wbro > $mfile | ||
echo "FFT Size: " | ||
du -sb tmp.bro | ||
../../target/debug/atsc -u --verbose tmp.bro >> $mfile | ||
|
||
sed -i -e 's/Output/output_fft/g' $mfile | ||
|
||
cp $infilename tmp.wbro | ||
|
||
../../target/debug/atsc --compressor idw --error $i tmp.wbro > /dev/null | ||
echo "IDW Size: " | ||
du -sb tmp.bro | ||
../../target/debug/atsc -u --verbose tmp.bro >> $mfile | ||
|
||
sed -i -e 's/Output/output_idw/g' $mfile | ||
|
||
cp $infilename tmp.wbro | ||
|
||
../../target/debug/atsc --compressor polynomial --error $i tmp.wbro > /dev/null | ||
echo "Polynomial Size: " | ||
du -sb tmp.bro | ||
../../target/debug/atsc -u --verbose tmp.bro >> $mfile | ||
|
||
sed -i -e 's/Output/output_poly/g' $mfile | ||
|
||
cp $infilename tmp.wbro | ||
|
||
../../target/debug/atsc --error $i tmp.wbro > /dev/null | ||
echo "Auto Size: " | ||
du -sb tmp.bro | ||
../../target/debug/atsc -u --verbose tmp.bro >> $mfile | ||
|
||
sed -i -e 's/Output/output_auto/g' $mfile | ||
|
||
echo "hold on;" >> $mfile | ||
echo "plot(Input,'g+', output_fft,'r', output_auto, 'b', output_poly, 'k')" >> $mfile | ||
echo "plot(Input.*((100+$i)/100), 'color','#D95319');" >> $mfile | ||
echo "plot(Input.*((100-$i)/100), 'color','#D95319');" >> $mfile | ||
echo "legend('Data','FFT Compression', 'Auto Compression', 'Poly compression', 'Upper Error', 'Lower Error')" >> $mfile | ||
echo "print -dpng comparison-$i.png" >> $mfile | ||
|
||
done | ||
|
||
rm tmp.wbro | ||
rm tmp.bro | ||
for i in 1 3; do | ||
echo "### Error Level: $i" | ||
htmlfile="comparison-error-$i.html" | ||
cp $infilename tmp.wbro | ||
../../target/debug/atsc --compressor fft --error $i --verbose tmp.wbro > input.txt | ||
echo "FFT Size: " | ||
du -sb tmp.bro | ||
../../target/debug/atsc -u --verbose tmp.bro > tmp_fft.txt | ||
cp $infilename tmp.wbro | ||
../../target/debug/atsc --compressor idw --error $i tmp.wbro > /dev/null | ||
echo "IDW Size: " | ||
du -sb tmp.bro | ||
../../target/debug/atsc -u --verbose tmp.bro > tmp_idw.txt | ||
cp $infilename tmp.wbro | ||
../../target/debug/atsc --compressor polynomial --error $i tmp.wbro > /dev/null | ||
echo "Polynomial Size: " | ||
du -sb tmp.bro | ||
../../target/debug/atsc -u --verbose tmp.bro > tmp_poly.txt | ||
|
||
# Create HTML file | ||
echo "<!DOCTYPE html>" > $htmlfile | ||
echo "<html lang=\"en\">" >> $htmlfile | ||
echo "<head>" >> $htmlfile | ||
echo "<meta charset=\"UTF-8\">" >> $htmlfile | ||
echo "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">" >> $htmlfile | ||
echo "<title>Comparison Error Level $i</title>" >> $htmlfile | ||
echo "<script src=\"https://cdn.jsdelivr.net/npm/chart.js\"></script>" >> $htmlfile | ||
echo "<script src=\"https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom\"></script>" >> $htmlfile | ||
echo "</head>" >> $htmlfile | ||
echo "<body>" >> $htmlfile | ||
echo "<canvas id=\"myChart\" width=\"400\" height=\"200\"></canvas>" >> $htmlfile | ||
echo "<script>" >> $htmlfile | ||
|
||
# Read data from tmp files and convert to JavaScript arrays | ||
|
||
file_content=$(<input.txt) | ||
array_data=$(echo $file_content | grep -oP '\[.*?\]') | ||
js_array="const inputData = $array_data;" | ||
echo "$js_array" >> $htmlfile | ||
|
||
file_content=$(<tmp_fft.txt) | ||
array_data=$(echo $file_content | grep -oP '\[.*?\]') | ||
js_array="const fftData = $array_data;" | ||
echo "$js_array" >> $htmlfile | ||
|
||
file_content=$(<tmp_idw.txt) | ||
array_data=$(echo $file_content | grep -oP '\[.*?\]') | ||
js_array="const idwData = $array_data;" | ||
echo "$js_array" >> $htmlfile | ||
|
||
file_content=$(<tmp_poly.txt) | ||
array_data=$(echo $file_content | grep -oP '\[.*?\]') | ||
js_array="const polyData = $array_data;" | ||
echo "$js_array" >> $htmlfile | ||
|
||
# JavaScript code to create the chart | ||
echo "const ctx = document.getElementById('myChart').getContext('2d');" >> $htmlfile | ||
echo "const myChart = new Chart(ctx, {" >> $htmlfile | ||
echo " type: 'line'," >> $htmlfile | ||
echo " data: {" >> $htmlfile | ||
echo " labels: Array.from({length: inputData.length}, (_, i) => i + 1)," >> $htmlfile | ||
echo " datasets: [" >> $htmlfile | ||
echo " { label: 'Data', data: inputData, borderColor: 'green', borderWidth: 1 }," >> $htmlfile | ||
echo " { label: 'FFT Compression', data: fftData, borderColor: 'red', borderWidth: 1 }," >> $htmlfile | ||
echo " { label: 'IDW Compression', data: idwData, borderColor: 'blue', borderWidth: 1 }," >> $htmlfile | ||
echo " { label: 'Poly Compression', data: polyData, borderColor: 'black', borderWidth: 1 }" >> $htmlfile | ||
echo " ]" >> $htmlfile | ||
echo " }," >> $htmlfile | ||
echo " options: {" >> $htmlfile | ||
echo " scales: {" >> $htmlfile | ||
echo " y: { beginAtZero: true }" >> $htmlfile | ||
echo " }," >> $htmlfile | ||
echo " plugins: {" >> $htmlfile | ||
echo " zoom: {" >> $htmlfile | ||
echo " pan: {" >> $htmlfile | ||
echo " enabled: true," >> $htmlfile | ||
echo " mode: 'xy'" >> $htmlfile | ||
echo " }," >> $htmlfile | ||
echo " zoom: {" >> $htmlfile | ||
echo " wheel: {" >> $htmlfile | ||
echo " enabled: true" >> $htmlfile | ||
echo " }," >> $htmlfile | ||
echo " pinch: {" >> $htmlfile | ||
echo " enabled: true" >> $htmlfile | ||
echo " }," >> $htmlfile | ||
echo " mode: 'xy'" >> $htmlfile | ||
echo " }" >> $htmlfile | ||
echo " }" >> $htmlfile | ||
echo " }" >> $htmlfile | ||
echo " }" >> $htmlfile | ||
echo "});" >> $htmlfile | ||
echo "</script>" >> $htmlfile | ||
echo "</body>" >> $htmlfile | ||
echo "</html>" >> $htmlfile | ||
|
||
rm tmp.wbro | ||
rm tmp.bro | ||
rm tmp_fft.txt | ||
rm tmp_idw.txt | ||
rm tmp_poly.txt | ||
rm input.txt | ||
done |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the PDF is not available for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it will be valid once we merge. It is pointing to main branch.