Yahoo Groups archive

QTR-Quadtone RIP

Index last updated: 2026-04-28 23:12 UTC

Thread

Concatenating ACV files (curves)

Concatenating ACV files (curves)

2016-06-26 by efo@...

I've uploaded a python script for applying a curve to a curve - that is, concatenating two ACV files so that you end up with a new file that has the effect of applying two curves, one after the other. I did this so I could use profiling tools (like Eisenlord's digital negative script, and presumably ChartThrob) iteratively. That is, you can get close by printing a step wedge, scanning it, using it to find a curve, and using that curve in your printer description. Then you can do the whole thing all over again but print to the newly curved printer - which if things are going perfectly gives you a linear result. But if the result is not linear, you can apply the new curve to the old one, and get a "refined" curve.

If you've never wanted to do this, you can ignore this upload. But if you, like me, have always wanted to... well, here you are. Familiarity with python and the shell/Terminal are necessary to use this - sorry, no GUI.

The script is called catacv.py. It requires that you have Python and a variety of Python libraries (numpy, scipy, struct) installed, and the script is run from the command line via
python catacv.py curve.acv delta.acv new.acv

Best wishes - Eben


Re: [QuadtoneRIP] Concatenating ACV files (curves)

2016-06-26 by Kerik Kouklis

Eben,

Great idea! I only wish I had the skills to use it.

-Kerik
Show quoted textHide quoted text

On Saturday, June 25, 2016, efo@... [QuadtoneRIP] <QuadtoneRIP@yahoogroups.com> wrote:

I've uploaded a python script for applying a curve to a curve - that is, concatenating two ACV files so that you end up with a new file that has the effect of applying two curves, one after the other. I did this so I could use profiling tools (like Eisenlord's digital negative script, and presumably ChartThrob) iteratively. That is, you can get close by printing a step wedge, scanning it, using it to find a curve, and using that curve in your printer description. Then you can do the whole thing all over again but print to the newly curved printer - which if things are going perfectly gives you a linear result. But if the result is not linear, you can apply the new curve to the old one, and get a "refined" curve.

If you've never wanted to do this, you can ignore this upload. But if you, like me, have always wanted to... well, here you are. Familiarity with python and the shell/Terminal are necessary to use this - sorry, no GUI.

The script is called catacv.py. It requires that you have Python and a variety of Python libraries (numpy, scipy, struct) installed, and the script is run from the command line via
python catacv.py curve.acv delta.acv new.acv

Best wishes - Eben


Re: Concatenating ACV files (curves)

2016-06-28 by ctb@...

Hi Eben,

I tried your script but it generated an error:

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/linalg/basic.py", line 99, in solve
raise LinAlgError("singular matrix")
numpy.linalg.linalg.LinAlgError: singular matrix

Does it have something to do with the standard python version in macos 10.11.5?


This error was preceded by several other terminal output lines that were no error. But I did not understand very well how to read them.

The script resides on my desktop. I was using two simple grayscale curves 1.acv and 2.acv. Output should be written to 3.acv. The script was called with this line:

python /Users/***/Desktop/catacv.py /Users/***/Desktop/1.acv /Users/***/Desktop/2.acv /Users/***/Desktop/3.acv

The complete script output is:

Traceback (most recent call last):
File "/Users/***/Desktop/catacv.py", line 125, in <module>
delta_filter.read_from_file(sys.argv[2])
File "/Users/***/Desktop/catacv.py", line 42, in read_from_file
self.polynomials = self._find_coefficients()
File "/Users/***/Desktop/catacv.py", line 70, in _find_coefficients
p = interpolate.interp1d(xdata, ydata, kind='cubic')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/interpolate/interpolate.py", line 383, in __init__
self._spline = splmake(x, y, order=order)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/interpolate/interpolate.py", line 868, in splmake
coefs = func(xk, yk, order, conds, B)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/interpolate/interpolate.py", line 565, in _find_smoothest
p = np.dual.solve(Q,tmp)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/linalg/basic.py", line 99, in solve
raise LinAlgError("singular matrix")
numpy.linalg.linalg.LinAlgError: singular matrix

Did I something wrong?

best regards,

Kees

Re: Concatenating ACV files (curves)

2016-08-01 by efo@...

I'm pretty sure you didn't do anything wrong, it's surely a bug in my code that I didn't catch.
Feel free to send me the curves you were using and I'll see if I can figure it out!!

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.