Search - User list
Full Version: PDG index sorting - Help needed
Root » PDG/TOPs » PDG index sorting - Help needed
nbjsargent
Hello; 

I'm just getting into PDG and have an interesting problem I'm trying to solve. I have a list of files that I'm trying to sort using PDG. The files are labelled x0y0,x0y1,x0y2.....x7y7. When I load them with the "filepattern" TOP, it sorts them as x0y0, x0y1, x0y2, x0y3 etc. Instead, I would like to re-sort them as x0y0,x1y0,x2y0,x3y0,x4y0 ..... x0y1,x1y1,x2y1,x3y1,x4y1 etc.

What would be the best approach for this? Any python algorithm that may be suitable for this that can be executed in TOPS? Maybe a feedback loop? What would such algorithm look like?
tamte
no need for feedback loop, just a bit of python
here is an example of a node that reorders workitems, in this case shuffles randomly but you can of course make it order them in any way you want
https://www.sidefx.com/forum/topic/83544/#post-361544 [www.sidefx.com]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB