Fractions or decimals

Started by HansEverts, September 15, 2013, 07:23:50 AM

Previous topic - Next topic

HansEverts

I hope I can raise this kind of question here, because it is related to, but not specifically IM5.


I would really like to be able to sort my images in order of shutter speed.

For that 3 things are needed:
1) the fractions need to be written as decimals. Is there a way?
2) the numbers should be ordered numerically, like 1, 11, 13, 20, 100, rather than 1, 10, 100, 11, 20, etc.
3) I should be able to groups them, like <1, 1-9, 10-19, etc.

I am going to have a serious look at the exiftool website, but any suggestions are welcome.

Mario

#1
I would start using a data-driven category on

Composite\ShutterSpeed\ShutterSpeed\0

(This is the Standard tag with the name 'Shutter Speed')

Use the default sort mode in the Category View (click on the Gear icon in the Category View toolbar to check) which sorts numerical values correctly) and you're all set. Try this first. Takes all but a minute. Even on databases with more than 50,000 files you end up with maybe 20 or 30 child categories, each for a different shutter speed. Very easy to manage.



If you really need 'ranges' of shutter speeds, combine several of the data-driven child categories via a category formula into another category.
For example, if you want a category 'shutter speed under 50' you create a normal category, and set an expression which combines all child categories representing shutter speeds < 50 from the data-driven category you have created above.

Tip: Use the Category @Builder to do that. Just drag the categories you want to include into a new category to the @Builder and then create a new category from that. See the help for details on the @Builder.



An alternative would be to create multiple data-driven categories on the shutter speed tag under a normal parent category. Use filters or numeric ranges to control which shutter speed values are put into which of the data-driven categories.

[attachment deleted by admin]
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

BenAW

#2
Quote from: HansEverts on September 15, 2013, 07:23:50 AM
For that 3 things are needed:
1) the fractions need to be written as decimals. Is there a way?
2) the numbers should be ordered numerically, like 1, 11, 13, 20, 100, rather than 1, 10, 100, 11, 20, etc.
3) I should be able to groups them, like <1, 1-9, 10-19, etc.
I also would use the datadriven category: Composite\ShutterSpeed\ShutterSpeed\0
Next select "Use RAW value" to Yes and you're mostly set.
Using a Filter you can create several subcategories with specific ranges of shutterspeeds.


You can play with the filter values and check the result using the Preview function.

[attachment deleted by admin]

sinus

#3
Phew, heavy ... but very helpful stuff!
Best wishes from Switzerland! :-)
Markus

Mario

This is all pretty easy, really.

To get a data-driven category for shutter speed, just select the shutter speed Default Tag and click OK.
IMatch does the rest.

Only when a user wants to somehow group multiple shutter speeds, or ranges of shutter speeds, things start to get more complex. But only few users ever will need such a thing. And IMatch can do it, in multiple ways. If you don't need it, don't bother. Just know that it's there if you ever going to need such extra complicated stuff.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

HansEverts

 I had the Composite\ShutterSpeed\ShutterSpeed\0 dynamic category, it was the grouping where I got stuck.

I have about 150 shutter speed values and grouping helps me with the slow shutter speed experiments I am doing.

The @builder solution Mario mentioned works, but it is easy to get confused with 150 values. I am still figuring out a formula, which goes sort of:

"^(0|1/)" which filters the <1

For the other groups (1-3, 4-10, etc) I am still studying http://www.regular-expressions.info/numericranges.html.

Then I have to make sure it applies only to the shutter speed dynamic category.

Anyway, I think this will keep me busy for a while.

BenAW

Quote from: HansEverts on September 15, 2013, 09:22:44 PM
I had the Composite\ShutterSpeed\ShutterSpeed\0 dynamic category, it was the grouping where I got stuck.

I have about 150 shutter speed values and grouping helps me with the slow shutter speed experiments I am doing.

The @builder solution Mario mentioned works, but it is easy to get confused with 150 values. I am still figuring out a formula, which goes sort of:

"^(0|1/)" which filters the <1

For the other groups (1-3, 4-10, etc) I am still studying http://www.regular-expressions.info/numericranges.html.

Then I have to make sure it applies only to the shutter speed dynamic category.

Anyway, I think this will keep me busy for a while.
Did you read my suggestion above?

HansEverts

Yes Ben, I read it and have been trying it out. I like the idea of a formula, because it can capture the unexpected.

A 'new' shutterspeed would escape the @builder solution. If you have shutterspeed 0,001 and 0,004, the builder sees it as text and so a new shutter speed of 0,002 would not be recognized as in between. Of course I can make a category for those new comers. But defining it as a range with a type of formula saying "take everything that starts with 0,00" would capture them all. Or "take everything that starts with 1 and has 2 digits before the dot" that would take care of 10-19. Am I making sense?

I also found that by playing around with the Edit data driven category, I come a long way. However, there is one problem, or perhaps a bug.

Without the RAW value, I have 44149 images over some 160 values from under to above zero. With the use of RAW I have 43038 images over fewer values and nothing above 0. The highest value is 0.25, Somehow RAW does not display higher values, even though they appear in the non-RAW category.

[attachment deleted by admin]

Richard

QuoteIf you expect that some of your files have no value for one of the levels in your data-driven category, enable the option to use an 'Other' element. Unless you want to explicitly suppress these files.

Hi Hans,

Since you are working with data-driven categories I wanted to remind you of "Other" in case it would help.

BenAW

Quote from: HansEverts on September 16, 2013, 06:42:48 AM
But defining it as a range with a type of formula saying "take everything that starts with 0,00" would capture them all. Or "take everything that starts with 1 and has 2 digits before the dot" that would take care of 10-19. Am I making sense?
That was my idea, make some subcats, each with it's own filter, together covering the whole range of shutterspeeds. It's the most elegant solution imo.

QuoteI also found that by playing around with the Edit data driven category, I come a long way. However, there is one problem, or perhaps a bug.

Without the RAW value, I have 44149 images over some 160 values from under to above zero. With the use of RAW I have 43038 images over fewer values and nothing above 0. The highest value is 0.25, Somehow RAW does not display higher values, even though they appear in the non-RAW category.
Exactly my experience. You may want to confirm this bugreport: https://www.photools.com/community/index.php?topic=864.0